WordPress.org

Make WordPress Core

Changeset 19153


Ignore:
Timestamp:
11/04/2011 02:47:37 PM (7 years ago)
Author:
duck_
Message:

Fix caps logic in wp_admin_bar_appearance_menu(). Show Themes on either switch_themes or edit_theme_options, and the rest of the appearance items on edit_theme_options. Fixes #19150.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/admin-bar.php

    r19150 r19153  
    575575 */
    576576function 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' ) || current_user_can( 'edit_theme_options' ) )
     578        $wp_admin_bar->add_menu( array( 'parent' => 'site-name', 'id' => 'themes', 'title' => __('Themes'), 'href' => admin_url('themes.php') ) );
    580579
    581580    if ( ! current_user_can( 'edit_theme_options' ) )
    582581        return;
    583 
    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') ) );
    586582
    587583    if ( current_theme_supports( 'widgets' )  )
Note: See TracChangeset for help on using the changeset viewer.