WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/14/2014 07:00:24 PM (7 years ago)
Author:
ocean90
Message:

Customizer: Add meta capability customize which is mapped to edit_theme_options.

You can now allow users to access the Customizer, say for any user who can edit_posts, via map_meta_cap or user_has_cap filter. See ticket for examples.

props westonruter, nacin.
fixes #28605.

File:
1 edited

Legend:

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

    r28253 r29170  
    431431            'actions'      => array(
    432432                'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
    433                 'customize'=> current_user_can( 'edit_theme_options' ) ? wp_customize_url( $slug ) : null,
     433                'customize' => ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) ? wp_customize_url( $slug ) : null,
    434434                'preview'   => add_query_arg( array(
    435435                    'preview'        => 1,
Note: See TracChangeset for help on using the changeset viewer.