WordPress.org

Make WordPress Core

Ticket #19150: 19150.2.diff

File 19150.2.diff, 1.1 KB (added by nacin, 7 years ago)
  • wp-includes/admin-bar.php

     
    574574 * @since 3.1.0
    575575 */
    576576function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
    577         // You can have edit_theme_options but not switch_themes.
    578         if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) )
    579                 return;
     577        if ( current_user_can( 'switch_themes' ) )
     578                $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
    580579
    581580        if ( ! current_user_can( 'edit_theme_options' ) )
    582581                return;
    583582
    584         if ( current_user_can( 'switch_themes' ) )
    585                 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
    586 
    587583        if ( current_theme_supports( 'widgets' )  )
    588584                $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
    589585