mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +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:
@@ -1306,6 +1306,9 @@ function map_meta_cap( $cap, $user_id ) {
|
||||
else
|
||||
$caps[] = 'do_not_allow';
|
||||
break;
|
||||
case 'customize' :
|
||||
$caps[] = 'edit_theme_options';
|
||||
break;
|
||||
default:
|
||||
// Handle meta capabilities for custom post types.
|
||||
$post_type_meta_caps = _post_type_meta_capabilities();
|
||||
|
||||
Reference in New Issue
Block a user