mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-08 19:20:03 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@29170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -430,7 +430,7 @@ function wp_prepare_themes_for_js( $themes = null ) {
|
||||
'update' => get_theme_update_available( $theme ),
|
||||
'actions' => array(
|
||||
'activate' => current_user_can( 'switch_themes' ) ? wp_nonce_url( admin_url( 'themes.php?action=activate&stylesheet=' . $encoded_slug ), 'switch-theme_' . $slug ) : null,
|
||||
'customize'=> current_user_can( 'edit_theme_options' ) ? wp_customize_url( $slug ) : null,
|
||||
'customize' => ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) ? wp_customize_url( $slug ) : null,
|
||||
'preview' => add_query_arg( array(
|
||||
'preview' => 1,
|
||||
'template' => urlencode( $theme->get_template() ),
|
||||
|
||||
Reference in New Issue
Block a user