Make WordPress Core


Ignore:
Timestamp:
11/23/2011 11:01:20 PM (15 years ago)
Author:
nacin
Message:

Use an 'appearance' group in the admin bar. fixes #19245.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r19429 r19434  
    539539 */
    540540function wp_admin_bar_appearance_menu( $wp_admin_bar ) {
     541        $wp_admin_bar->add_group( array( 'parent' => 'site-name', 'id' => 'appearance' ) );
     542
    541543        if ( current_user_can( 'switch_themes' ) || current_user_can( 'edit_theme_options' ) )
    542                 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
     544                $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
    543545
    544546        if ( ! current_user_can( 'edit_theme_options' ) )
     
    546548
    547549        if ( current_theme_supports( 'widgets' )  )
    548                 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
     550                $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) );
    549551
    550552         if ( current_theme_supports( 'menus' ) || current_theme_supports( 'widgets' ) )
    551                 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
     553                $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'menus', 'title' => __('Menus'), 'href' => admin_url('nav-menus.php') ) );
    552554
    553555        if ( current_theme_supports( 'custom-background' ) )
    554                 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) );
     556                $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) );
    555557
    556558        if ( current_theme_supports( 'custom-header' ) )
    557                 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) );
     559                $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) );
    558560}
    559561
Note: See TracChangeset for help on using the changeset viewer.