Make WordPress Core


Ignore:
Timestamp:
07/14/2014 07:00:24 PM (11 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/class-wp-themes-list-table.php

    r29137 r29170  
    150150                . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '">' . __( 'Preview' ) . '</a>';
    151151
    152             if ( current_user_can( 'edit_theme_options' ) )
     152            if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
    153153                $actions['preview'] .= '<a href="' . wp_customize_url( $stylesheet ) . '" class="load-customize hide-if-no-customize">'
    154154                    . __( 'Live Preview' ) . '</a>';
     155            }
    155156
    156157            if ( ! is_multisite() && current_user_can( 'delete_themes' ) )
Note: See TracChangeset for help on using the changeset viewer.