Kadence
New in v3.9.0. Kadence stores its customizer settings as theme_mods, structured objects that reference slots of a global color palette (palette1…palette9, up to palette15). The palette itself lives in Kadence’s own kadence_global_palette option. EMCP Tools exposes a curated allowlist of those settings over two dispatcher tools, so an agent can read and adjust your site’s theme design directly. Registers only when Kadence is the active theme.
For discovering and inserting Kadence’s own blocks and Design Library patterns (a separate pack, independent of the active theme), see Block builder catalogs on the Gutenberg blocks page.
How it works
Section titled “How it works”Both tools take { operation, arguments }. Omit operation to get back the list of available operations for that tool.
emcp-tools/kadence-read
Section titled “emcp-tools/kadence-read”Operation: get-settings. Reads curated Kadence settings with their value plus type/label/group/shape metadata. Colors reference the global palette slugs palette1…palette9 rather than raw hex, so read global_palette first to know what those slots currently mean.
Arguments: group (optional: palette, colors, typography, layout, buttons, or header-footer) or keys (optional array of specific setting keys). Omit both to return everything on the allowlist.
emcp-tools/kadence-write
Section titled “emcp-tools/kadence-write”Operation: update-settings. Writes settings by key as theme_mods, except global_palette, which is saved to Kadence’s kadence_global_palette option. Values are structured objects, read the shape from get-settings first rather than guessing the field layout.
Arguments: values, an object of { key: value } pairs.
The response has three parts: updated (the keys written), skipped (keys not on the allowlist) and rejected, an object of { key: reason } for values that failed the checks below. Nothing is written for a rejected key; the other keys in the same call are still saved.
Value checks
Section titled “Value checks”Kadence prints these settings into its inline CSS, and a theme_mod write runs none of its Customizer checks, so each value is checked here (since v3.20.0):
- Settings objects may hold only identifier keys (letters, digits,
_and-), numbers, booleans,null, palette slugs, colors (hex,rgb(),rgba(),var(--name)), plainhttp(s)URLs, and plain text without;{}<>\@:or parentheses. Objects nest at most 6 levels and hold at most 500 values. page_layouttakes a layout id of lowercase letters, digits, hyphens and underscores, e.g."normal".
The global palette
Section titled “The global palette”Since v3.20.0, global_palette is read from and saved to Kadence’s own kadence_global_palette option, the one the theme reads (earlier versions saved a theme_mod Kadence never used). The shape is:
{ "palette": [ { "color": "#2B6CB0", "slug": "palette1", "name": "Accent" }, ... ], "second-palette": [ ... ], "third-palette": [ ... ], "active": "palette"}- Each palette lists 9 to 15 slots in order, with slugs
palette1topalette15. Kadence finds a slot by its position, so a slot whose slug does not match its position is refused. A slot without a slug gets the one for its position. - Colors are hex,
rgb()orrgba(); avar()is refused. - Send only the palettes you change: the others are kept as stored.
activeswitches the palette in use:palette,second-paletteorthird-palette.
The allowlist
Section titled “The allowlist”| Key | Group | Shape |
|---|---|---|
global_palette | palette | { palette: [{ color, slug, name }, …9 to 15 slots], "second-palette": [...], "third-palette": [...], active }. See The global palette. Everything else references slots as "palette1"…"palette9". |
link_color | colors | { highlight: "palette1", "highlight-alt": "palette2", "highlight-alt2": "palette9", style: "standard" } |
base_font | typography | { size:{desktop,tablet?,mobile?}, sizeType:"px", lineHeight:{desktop}, family, google:bool, weight, variant, color:"palette4" } |
heading_font | typography | { family:"inherit"|"Font Name", google:bool }, the global heading family. |
h1_font…h6_font | typography | Same shape as base_font, one per heading level. |
content_width | layout | { size:1290, unit:"px" } |
page_layout | layout | "normal" | "fullwidth" | "left-sidebar" | "right-sidebar" |
buttons_background | buttons | { color:"palette1", hover:"palette2" } |
buttons_typography | buttons | { size:{desktop}, family, weight, variant } |
buttons_border_radius | buttons | { size:{desktop,tablet,mobile}, unit:{desktop:"px",...} } |
header_main_background | header-footer | { desktop:{ color:"palette1" } } |
footer_wrap_background | header-footer | { desktop:{ color:"palette9" } } |
Call get-settings first, read the returned shape for a key, then send a matching object back to update-settings.
Permissions
Section titled “Permissions”Both tools are gated on edit_theme_options. Kadence renders its dynamic CSS inline per request, so there’s no cache to invalidate after a write, the change is visible immediately.
Independent block integration
Section titled “Independent block integration”In 3.17.0, Kadence Blocks has its own tools and an independent switch on EMCP Tools → Page Builders. Theme configuration stays in Themes. The block plugin does not require the matching theme.
In the admin
Section titled “In the admin”Both tools sit under EMCP Tools → Tools → Themes, in the Kadence section. Kadence Read is on by default and Kadence Write ships off. While Kadence is not the active theme, both cards carry a Needs Kadence badge and cannot be switched on. After changing a switch, choose Save changes in the save bar and reconnect your AI client.
