[php]
function theme_options_panel(){
add_menu_page(‘Theme page title’, ‘Theme menu label’, ‘manage_options’, ‘theme-options’, ‘wps_theme_func’);
add_submenu_page( ‘theme-options’, ‘Settings page title’, ‘Settings menu label’, ‘manage_options’, ‘theme-op-settings’, ‘wps_theme_func_settings’);
add_submenu_page( ‘theme-options’, ‘FAQ page title’, ‘FAQ menu label’, ‘manage_options’, ‘theme-op-faq’, ‘wps_theme_func_faq’);
}
add_action(‘admin_menu’, ‘theme_options_panel’);
function wps_theme_func(){
echo ‘<div class="wrap"><div id="icon-options-general" class="icon32"><br></div>
<h2>Theme</h2></div>’;
}
function wps_theme_func_settings(){
echo ‘<div class="wrap"><div id="icon-options-general" class="icon32"><br></div>
<h2>Settings</h2></div>’;
}
function wps_theme_func_faq(){
echo ‘<div class="wrap"><div id="icon-options-general" class="icon32"><br></div>
<h2>FAQ</h2></div>’;
}
[/php]
CH02用戶資料
- 01取得現在用戶的相關資料
- 02確認現在用戶是否是admin
- 05current_user_can 用來判斷現在這個用戶的權利..
- 05取得現在的URL
- wordpress FTP下載plugin 出現 找不到wp-content ..
- 01 撰寫外掛plugins
- 02 增加編輯頁的sub menu
- 03 add_menu_page 設定用戶
- 04 同時可以在admin 和 author 中使用 控制台..
- 05WordPress的Action Hook與Filter Hook
- 06 wordpress filter 列表
- 後台的「說明」
- 01 admin_head 管理者後台時,head 顯示時..
- 01 HOOK 的原理
- 01官方列表
- 02 admin_notices 管理者後台時,通知管理者動作..
- 04init 添加javasscrupt 連結
- 05wp_head 添加javasscrupt 連結
- admin_footer
- register_activation_hook
- 如何加上javascript
- 設計HOOK和啟動HOOK
- 01官方列表
- 02the_content當顯示文章內容
- 02刪除post
- 03the_content修改內容
- 04mce_buttons_3, 增強編輯氣的工能..
- post_thumbnail_html 和 image_send_to_edit..