Changeset 14581 for trunk/wp-admin/menu.php
- Timestamp:
- 05/12/2010 07:19:57 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/menu.php
r14571 r14581 146 146 $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' ); 147 147 148 $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' ); 149 $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); 150 $submenu['themes.php'][10] = array(__('Menus'), 'switch_themes', 'nav-menus.php'); 148 if ( current_user_can( 'switch_themes') ) { 149 $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' ); 150 $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); 151 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php'); 152 } else { 153 $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' ); 154 $submenu['themes.php'][5] = array(__('Themes'), 'edit_theme_options', 'themes.php'); 155 $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' ); 156 } 151 157 152 158 // Add 'Editor' to the bottom of the Appearence menu. … … 282 288 283 289 // Loop over the top-level menu. 284 // Menus for which the original parent is not ac essible due to lack of privs will have the next290 // Menus for which the original parent is not accessible due to lack of privs will have the next 285 291 // submenu in line be assigned as the new menu parent. 286 292 foreach ( $menu as $id => $data ) {
Note: See TracChangeset
for help on using the changeset viewer.