WordPress.org

Make WordPress Core

Changeset 13783


Ignore:
Timestamp:
03/21/2010 01:01:45 AM (9 years ago)
Author:
dd32
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/menu.php

    r13745 r13783  
    142142add_action('admin_menu', '_add_themes_utility_last', 101);
    143143function _add_themes_utility_last() {
    144     global $submenu;
    145     $submenu['themes.php'][] = array(_x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
     144    // Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
     145    add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
    146146}
    147147
Note: See TracChangeset for help on using the changeset viewer.