04 同時可以在admin 和 author 中使用 控制台


function theme_options_panel(){
  add_menu_page('Theme page title', 'My APP Yes! 後台設定', 'author', 'theme-options', 'MyAPPYesBuilder_theme_func');
  add_submenu_page( 'theme-options', 'Settings page title', 'Settings menu label', 'author', 'theme-op-settings', 'wps_theme_func_settings');
  add_submenu_page( 'theme-options', 'FAQ page title', 'FAQ menu label', 'author', 'theme-op-faq', 'wps_theme_func_faq');



  add_menu_page('Theme page title', 'My APP Yes! 後台設定', 'administrator', 'theme-options2', 'MyAPPYesBuilder_theme_func');
  add_submenu_page( 'theme-options2', 'Settings page title', 'Settings menu label', 'administrator', 'theme-op-settings', 'wps_theme_func_settings');
  add_submenu_page( 'theme-options2', 'FAQ page title', 'FAQ menu label', 'administrator', 'theme-op-faq', 'wps_theme_func_faq');

}
add_action('admin_menu', 'theme_options_panel');
function MyAPPYesBuilder_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>';
}

Screen Shot 2015-12-26 at 7.02.42 PM

wordpress
CH02用戶資料CH03基本APICH05 分類頁面Category.phpCH09Screen Options(顯示選項)CH10外掛pluginsCH11 add_actionCH12 add_filterCH13Meta Box(自訂區塊)CH14widget(自訂模組)CH15 DBCH16AJAXCH17ShortcodeCH20 wordpress muCH30WooCommerce