Opened 15 years ago
Closed 15 years ago
#19150 closed defect (bug) (fixed)
Redundant caps checks in wp_admin_bar_appearance_menu()
| Reported by: | duck_ | Owned by: | duck_ |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | General | Version: | 3.3 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
As wp_admin_bar_appearance_menu() had the parent removed, the cap checks can be simplified quite a bit.