mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Add "Customize" as first item under Appearance menu.
fixes #21413. props ryanhellyer, obenland, DrewAPicture git-svn-id: https://develop.svn.wordpress.org/trunk@23871 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
+9
-11
@@ -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'][4] = array( __( 'Customize' ), $appearance_cap, 'customize.php', 'hide-if-no-customize' );
|
||||
$submenu['themes.php'][5] = array(__( 'Themes' ), $appearance_cap, 'themes.php');
|
||||
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() )
|
||||
|
||||
Reference in New Issue
Block a user