mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 00:01:27 +01:00
Bring the Appearance sub-menus on the front end one level up, see #18197
git-svn-id: http://svn.automattic.com/wordpress/trunk@19006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a0606b3c93
commit
ca0acb7a05
@ -572,30 +572,32 @@ function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
|
||||
if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) )
|
||||
return;
|
||||
|
||||
/* take the subs one level up
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'id' => 'appearance',
|
||||
'title' => __('Appearance'),
|
||||
'href' => admin_url('themes.php'),
|
||||
'parent' => 'site-name',
|
||||
) );
|
||||
*/
|
||||
|
||||
if ( ! current_user_can( 'edit_theme_options' ) )
|
||||
return;
|
||||
|
||||
if ( current_user_can( 'switch_themes' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
|
||||
|
||||
if ( current_theme_supports( 'widgets' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
|
||||
|
||||
if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
|
||||
|
||||
if ( current_theme_supports( 'custom-background' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) );
|
||||
|
||||
if ( current_theme_supports( 'custom-header' ) )
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) );
|
||||
$wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user