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/dashboard.php

    r29130 r29170  
    12801280    <div class="welcome-panel-column-container">
    12811281    <div class="welcome-panel-column">
    1282         <h4><?php _e( 'Get Started' ); ?></h4>
    1283         <a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
     1282        <?php if ( current_user_can( 'customize' ) ): ?>
     1283            <h4><?php _e( 'Get Started' ); ?></h4>
     1284            <a class="button button-primary button-hero load-customize hide-if-no-customize" href="<?php echo wp_customize_url(); ?>"><?php _e( 'Customize Your Site' ); ?></a>
     1285        <?php endif; ?>
    12841286        <a class="button button-primary button-hero hide-if-customize" href="<?php echo admin_url( 'themes.php' ); ?>"><?php _e( 'Customize Your Site' ); ?></a>
    12851287        <?php if ( current_user_can( 'install_themes' ) || ( current_user_can( 'switch_themes' ) && count( wp_get_themes( array( 'allowed' => true ) ) ) > 1 ) ) : ?>
Note: See TracChangeset for help on using the changeset viewer.