Do not display empty Appearance menu for subscribers. Need to use Menu API after the _admin_menu hook has fired.

git-svn-id: https://develop.svn.wordpress.org/trunk@13783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-03-21 01:01:45 +00:00
parent 1559240917
commit cf430f20d0
1 changed files with 2 additions and 2 deletions

View File

@ -141,8 +141,8 @@ $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-to
// Add 'Editor' to the bottom of the Appearence menu.
add_action('admin_menu', '_add_themes_utility_last', 101);
function _add_themes_utility_last() {
global $submenu;
$submenu['themes.php'][] = array(_x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
}
$update_plugins = get_site_transient( 'update_plugins' );