Opened 14 years ago
Closed 14 years ago
#19150 closed defect (bug) (fixed)
Redundant caps checks in wp_admin_bar_appearance_menu()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.3 | Priority: | normal |
| Severity: | normal | Version: | 3.3 |
| Component: | General | Keywords: | has-patch |
| Focuses: | Cc: |
Description
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.
Attachments (2)
Change History (4)
Note: See
TracTickets for help on using
tickets.
As wp_admin_bar_appearance_menu() had the parent removed, the cap checks can be simplified quite a bit.