[WordPress] 外掛分享: JJCM Editor Theme Access for Kadence

首頁 › 外掛目錄 › JJCM Editor Theme Access for Kadence
全新外掛
安裝啟用
—
尚無評分
7 天前
最後更新
—
問題解決
WordPress 5.8+ PHP 7.4+ v2.1.2 上架:2026-10-07

內容簡介

JJCM Editor Theme Access for Kadence 外掛允許編輯者角色在使用 Kadence 佈景主題時,獲得對自訂面板的訪問權限,解決了編輯者無法使用 Kadence 自訂功能的問題。

【主要功能】
• 允許編輯者訪問 Kadence 自訂面板
• 僅在使用 Kadence 佈景主題時啟用
• 不會對資料庫進行任何寫入操作
• 支援自訂 AJAX 和 REST 路由
• 可限制特定使用者的訪問權限

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.1.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「JJCM Editor Theme Access for Kadence」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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:

Only when the active theme is actually Kadence (or a Kadence
child theme). The plugin can stay installed and active on any
WordPress site — it does nothing on sites using a different theme.
There is no need to deactivate it when switching themes, or to
install a different variant for other themes.
Only at runtime. The capability is never written to the role
or to any database option — it is returned by the user_has_cap
filter only for the duration of the current HTTP request.
Only during verified Customizer requests, with a nonce check
on every possible path: native Customizer preview, AJAX save
requests, and REST requests to /wp/v2/settings or
/wp/v2/themes. The mere presence of a URL parameter is never
enough on its own — this prevents an Editor from obtaining
manage_options on other wp-admin pages simply by tampering with
the query string.

Outside 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

There is no add_cap() call on the WP_Role object, in any
activation, deactivation, or admin_init hook.
There is no register_setting, update_option, or
update_user_meta anywhere in the plugin.
Deactivating the plugin immediately restores native WordPress
behavior for all Editors; uninstalling leaves no residue in the
database.

Extensibility
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' ) );
} );

延伸相關外掛

文章
Filter
Mastodon