Changeset 17741
- Timestamp:
- 04/28/2011 11:17:09 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/admin-bar.php
r17731 r17741 219 219 */ 220 220 function wp_admin_bar_appearance_menu( $wp_admin_bar ) { 221 if ( !current_user_can('switch_themes') ) 221 // You can have edit_theme_options but not switch_themes. 222 if ( ! current_user_can('switch_themes') && ! current_user_can( 'edit_theme_options' ) ) 222 223 return; 223 224 224 225 $wp_admin_bar->add_menu( array( 'id' => 'appearance', 'title' => __('Appearance'), 'href' => admin_url('themes.php') ) ); 225 226 226 if ( !current_user_can('edit_theme_options') ) 227 return; 227 if ( ! current_user_can( 'edit_theme_options' ) ) 228 return; 229 230 if ( current_user_can( 'switch_themes' ) ) 231 $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) ); 228 232 229 233 if ( current_theme_supports( 'widgets' ) ) … … 236 240 $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'background', 'title' => __('Background'), 'href' => admin_url('themes.php?page=custom-background') ) ); 237 241 238 if ( current_theme_supports( 'custom-header -uploads' ) )242 if ( current_theme_supports( 'custom-header' ) ) 239 243 $wp_admin_bar->add_menu( array( 'parent' => 'appearance', 'id' => 'header', 'title' => __('Header'), 'href' => admin_url('themes.php?page=custom-header') ) ); 240 244 }
Note: See TracChangeset
for help on using the changeset viewer.