WP Plugin: 管理パネルの「ヘルプ」から日本語ドキュメントを参照 - ps more help
Responses:
- No Responses yet
- コメントをどうぞ
- Trackback URI
- RSS 2.0: 更新情報
- RSS 2.0: Comments
管理パネルの右上の「ヘルプ」タブをクリックすると、その画面のヘルプがうにょーんと出てくる。
その中に、日本語Codex の該当ページへのリンクを追加するプラグインを作っています。
とりあえず動くようになっただけのアルファ版なのですけど、動作やコードを見てくださる方がいたら助けてくださいー。
# まずは、とりあえずアップグレードしろ、あたりから。。。orz 小気味よいツッコミに10ポイント進呈。
プラグインの説明:
- 日本語Codex にリンク張るだけプラグイン。
- まだ日本語ドキュメントがない画面があります。
- まだ和訳されてないページもあります。
- DB とかいじりません。
- 本当は「Oher Help」の上あたりに挿入したかった。
- WordPress 2.7 以上専用。
例によってそのままコードを貼り付けまする。。
テキストエディタにコピペして UTF-8 BOM なしで保存して wp-content/plugins/ps_more_help ディレクトリあたりにアップロードで有効化、です。
<?php
/*
Plugin Name: ps more help
Plugin URI: http://bono.s206.xrea.com/
Description: 管理パネルの「ヘルプ」に日本語ドキュメントへのリンクを追加
Author: bono
Version: 0.1alpha
Author URI: http://bono.s206.xrea.com/
SVN Version: $id$
*/
add_action('contextual_help', 'add_help');
function add_help( $contextual_help ) {
global $title;
$new_contextual_help = $contextual_help;
switch ( $title ) {
case __('Dashboard'):
// $new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Dashboard_SubPanel" target="_blank">ダッシュボード画面の説明</a></p>';
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/%E7%AE%A1%E7%90%86%E3%83%91%E3%83%8D%E3%83%AB/%E3%83%80%E3%83%83%E3%82%B7%E3%83%A5%E3%83%9C%E3%83%BC%E3%83%89" target="_blank">ダッシュボード画面の説明</a></p>';
break;
case __('Edit Posts'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Posts_Edit_SubPanel" target="_blank">投稿編集画面の説明</a></p>';
break;
// case __('Add New Post'): デフォルトで Writing Posts へのリンクがある
// $new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Posts_Add_New_SubPanel" target="_blank">新規投稿画面の説明</a></p>';
// break;
case __('Tags'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Posts_Tags_SubPanel" target="_blank">タグ画面の説明</a></p>';
break;
case __('Categories'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Posts_Categories_SubPanel" target="_blank">カテゴリー画面の説明</a></p>';
break;
case __('Media Library'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Media Library SubPanel" target="_blank">メディアライブラリ画面の説明</a></p>';
break;
case __('Upload New Media'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Media_Add_New_SubPanel" target="_blank">新規メディアアップロード画面の説明</a></p>';
break;
case __('Edit Links'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Links_Edit_SubPanel" target="_blank">リンク編集画面の説明</a></p>';
break;
case __('Add New Link'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Links_Add_New_SubPanel" target="_blank">新規リンク追加画面の説明</a></p>';
break;
case __('Link Categories'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Links_Link_Categories_SubPanel" target="_blank">リンクカテゴリー画面の説明</a></p>';
break;
case __('Edit Pages'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Pages_Edit_SubPanel" target="_blank">ページ編集画面の説明</a></p>';
break;
case __('Add New Page'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Pages_Add_New_SubPanel" target="_blank">新規ページ追加画面の説明</a></p>';
break;
case __('Edit Comments'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Comments_Comments_SubPanel" target="_blank">コメント編集画面の説明</a></p>';
break;
case __('Manage Themes'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Appearance_Themes_SubPanel" target="_blank">テーマ管理画面の説明</a></p>';
break;
case __('Widgets'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Appearance_Widgets_SubPanel" target="_blank">ウィジェット画面の説明</a></p>';
break;
case __('Edit Themes'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Appearance_Editor_SubPanel" target="_blank">テーマ編集画面の説明</a></p>';
break;
case __('Customize Header'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Appearance_Header_Image_and_Color_SubPanel" target="_blank">ヘッダのカスタマイズ画面の説明</a></p>';
break;
case __('Manage Plugins'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Plugins_Installed_SubPanel" target="_blank">プラグイン管理画面の説明</a></p>';
break;
case __('Install Plugins'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Plugins_Add_New_SubPanel" target="_blank">プラグインインストール画面の説明</a></p>';
break;
case __('Edit Plugins'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Plugins_Editor_SubPanel" target="_blank">プラグイン編集画面の説明</a></p>';
break;
case __('Users'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Users_Authors_and_Users_SubPanel" target="_blank">ユーザー画面の説明</a></p>';
break;
case __('Add New User'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Users_Add_New_SubPanel" target="_blank">新規ユーザー追加画面の説明</a></p>';
break;
case __('Profile'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Users_Your_Profile_SubPanel" target="_blank">プロフィール画面の説明</a></p>';
break;
case __('Tools'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Tools_Tools_SubPanel" target="_blank">ツール画面の説明</a></p>';
break;
case __('Import'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Tools_Import_SubPanel" target="_blank">インポート画面の説明</a></p>';
break;
case __('Export'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Tools_Export_SubPanel" target="_blank">エクスポート画面の説明</a></p>';
break;
case __('Upgrade WordPress'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Tools_Upgrade_SubPanel" target="_blank">WordPress アップグレード画面の説明</a></p>';
break;
// case __('General Settings'): デフォルトでリンクあり
// $new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_General_SubPanel" target="_blank">一般設定画面の説明</a></p>';
// break;
case __('Writing Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Writing_SubPanel" target="_blank">投稿設定画面の説明</a></p>';
break;
case __('Reading Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Reading_SubPanel" target="_blank">表示設定画面の説明</a></p>';
break;
case __('Discussion Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Discussion_SubPanel" target="_blank">ディスカッション設定画面の説明</a></p>';
break;
case __('Media Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Media_SubPanel" target="_blank">メディア設定画面の説明</a></p>';
break;
case __('Privacy Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Privacy_SubPanel" target="_blank">プライバシー設定画面の説明</a></p>';
break;
case __('Permalink Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Permalinks_SubPanel" target="_blank">パーマリンク設定画面の説明</a></p>';
break;
case __('Miscellaneous Settings'):
$new_contextual_help .= '<p><a href="http://wpdocs.sourceforge.jp/Settings_Miscellaneous_SubPanel" target="_blank">その他の設定画面の説明</a></p>';
break;
}
return $new_contextual_help;
}
?>



