diff --git a/wp-includes/admin-bar.php b/wp-includes/admin-bar.php index 68e3e09dd..8101cf641 100644 --- a/wp-includes/admin-bar.php +++ b/wp-includes/admin-bar.php @@ -574,16 +574,12 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) { * @since 3.1.0 */ function wp_admin_bar_appearance_menu( $wp_admin_bar ) { - // You can have edit_theme_options but not switch_themes. - if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) ) - return; + if ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) ) + $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) ); if ( ! current_user_can( 'edit_theme_options' ) ) return; - if ( current_user_can( 'switch_themes' ) ) - $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' => 'site-name', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );