The Kadence theme uses its own internal capability check to decide
whether to display its own Customizer panels (Header, Footer, Colors
& Fonts, General, Posts/Pages Layout, Homepage Settings, etc.). In
practice, that check is only satisfied by manage_options — the
standard edit_theme_options capability, which the Editor role
normally lacks, is not enough: an Editor with only
edit_theme_options still sees just the native WordPress panels
(Site Identity, Menus, Widgets, Additional CSS), not Kadence’s own
panels.
This plugin solves that by granting manage_options to Editor users,
but in a tightly scoped way:
user_has_cap/wp/v2/settings orOutside of those conditions, the Editor has manage_options nowhere
else: they remain without access to Plugins, Users, or any other page
that depends on that capability.
Nothing is written to the database
add_cap() call on the WP_Role object, in anyadmin_init hook.register_setting, update_option, orExtensibility
By default, the elevation applies to all Editors (within the
conditions above). To restrict it to specific users, use the
etak_grant_theme_access filter in a must-use plugin or in the
theme’s functions.php — without modifying this plugin:
add_filter( 'etak_grant_theme_access', function ( $grant, $user ) {
return in_array( $user->ID, array( 5, 12 ), true );
}, 10, 2 );
You can also adjust the AJAX actions and REST routes recognized as
Customizer/Kadence context through the etak_customizer_ajax_actions
and etak_customizer_rest_routes filters — useful if your site has
additional Kadence-related integrations using different actions or
routes than the defaults.
If your Kadence installation (or a variant of it) uses a different
theme slug, adjust it with etak_kadence_theme_slugs:
add_filter( 'etak_kadence_theme_slugs', function ( $slugs ) {
return array_merge( $slugs, array( 'my-kadence-slug' ) );
} );