Changeset 19434
- Timestamp:
- 11/23/2011 11:01:20 PM (13 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r19429 r19434 539 539 */ 540 540 function wp_admin_bar_appearance_menu( $wp_admin_bar ) { 541 $wp_admin_bar->add_group( array( 'parent' => 'site-name', 'id' => 'appearance' ) ); 542 541 543 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') ) ); 543 545 544 546 if ( ! current_user_can( 'edit_theme_options' ) ) … … 546 548 547 549 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') ) ); 549 551 550 552 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') ) ); 552 554 553 555 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') ) ); 555 557 556 558 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') ) ); 558 560 } 559 561 -
trunk/wp-includes/class-wp-admin-bar.php
r19429 r19434 127 127 global $is_IE, $is_iphone; 128 128 129 $back_compat_parents = array(130 'appearance' => 'site-name',131 );132 133 129 // Link nodes to parents. 134 130 foreach ( $this->nodes as $node ) { 135 136 if ( isset( $back_compat_parents[ $node->parent ] ) )137 $node->parent = $back_compat_parents[ $node->parent ];138 131 139 132 // Handle root menu items
Note: See TracChangeset
for help on using the changeset viewer.