Ticket #19150: 19150.2.diff
File 19150.2.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/admin-bar.php
574 574 * @since 3.1.0 575 575 */ 576 576 function 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') ) ); 580 579 581 580 if ( ! current_user_can( 'edit_theme_options' ) ) 582 581 return; 583 582 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 587 583 if ( current_theme_supports( 'widgets' ) ) 588 584 $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'widgets', 'title' => __('Widgets'), 'href' => admin_url('widgets.php') ) ); 589 585