WordPress.org

Make WordPress Core

Changeset 19434


Ignore:
Timestamp:
11/23/11 23:01:20 (2 years ago)
Author:
nacin
Message:

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

Location:
trunk/wp-includes
Files:
2 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 
  • trunk/wp-includes/class-wp-admin-bar.php

    r19429 r19434  
    127127        global $is_IE, $is_iphone; 
    128128 
    129         $back_compat_parents = array( 
    130             'appearance' => 'site-name', 
    131         ); 
    132  
    133129        // Link nodes to parents. 
    134130        foreach ( $this->nodes as $node ) { 
    135  
    136             if ( isset( $back_compat_parents[ $node->parent ] ) ) 
    137                 $node->parent = $back_compat_parents[ $node->parent ]; 
    138131 
    139132            // Handle root menu items 
Note: See TracChangeset for help on using the changeset viewer.