X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/baca9ce86a38dc54c4574890ee2d352fd81f78b2..61343b82c4f0da4c68e4c6373daafff4a81efdd1:/wp-admin/menu.php diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 90c585db..365b4595 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -136,17 +136,15 @@ unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $me $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' ); -if ( current_user_can( 'switch_themes') ) { - $menu[60] = array( __('Appearance'), 'switch_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'none' ); - $submenu['themes.php'][5] = array(__('Themes'), 'switch_themes', 'themes.php'); - if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) - $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php'); -} else { - $menu[60] = array( __('Appearance'), 'edit_theme_options', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'none' ); - $submenu['themes.php'][5] = array(__('Themes'), 'edit_theme_options', 'themes.php'); - if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) - $submenu['themes.php'][10] = array(__('Menus'), 'edit_theme_options', 'nav-menus.php' ); -} +$appearance_cap = current_user_can( 'switch_themes') ? 'switch_themes' : 'edit_theme_options'; + +$menu[60] = array( __('Appearance'), $appearance_cap, 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div' ); + $submenu['themes.php'][5] = array( __( 'Themes' ), $appearance_cap, 'themes.php' ); + $submenu['themes.php'][6] = array( __( 'Customize' ), 'edit_theme_options', 'customize.php', 'hide-if-no-customize' ); + if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) ) + $submenu['themes.php'][10] = array(__( 'Menus' ), 'edit_theme_options', 'nav-menus.php'); + +unset( $appearance_cap ); // Add 'Editor' to the bottom of the Appearance menu. if ( ! is_multisite() )