[wp-trac] [WordPress Trac] #19150: Redundant caps checks in wp_admin_bar_appearance_menu()

WordPress Trac wp-trac at lists.automattic.com
Fri Nov 4 14:02:23 UTC 2011


#19150: Redundant caps checks in wp_admin_bar_appearance_menu()
--------------------------+-----------------------------
 Reporter:  duck_         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  3.3
 Severity:  normal        |   Keywords:  has-patch
--------------------------+-----------------------------
 {{{
 if ( ! current_user_can('switch_themes') && ! current_user_can(
 'edit_theme_options' ) )
     return;

 if ( ! current_user_can( 'edit_theme_options' ) )
     return;
 }}}

 The first set can just be removed.

 However, I think that the correct behaviour would be to display "Themes"
 if the user has either `switch_themes` or `edit_theme_options` and only
 display the rest if they have `edit_theme_options`.

 Related: [17741] and #15931; [19006], [19026] and #18197.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19150>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list