Kindly EditDocumentationTry the editor

kindly-theme.php

The Kindly Edit > Theme screen: client design settings edited by hand, with a live preview (0.9.15).

Responsibility#

The Kindly Edit > Theme screen (Theme settings): every client design setting edited by hand, with the site's home page as a live preview, saved through the same validated draft and publish steps as the client design abilities. Added in 0.9.15.

This is an implementation reference for the 0.9.15 module. Internal PHP helpers are not a compatibility promise for third-party callers. Prefer the documented REST, Abilities, theme, and filter contracts.

theme-design, kindly-menu, theme, tones.

Module constants#

const CANTATA_EDIT_THEME_PAGE = 'kindly-theme';

WordPress hooks#

Operation Hook
add_action admin_menu (adds the Theme screen; removes the theme's Appearance > Kindly Design form)
add_action admin_init (redirects page=cantata-design to this screen)
add_action init (the draft preview)
add_action rest_api_init (theme-settings routes)
add_action admin_enqueue_scripts

The preview is the site's home page with ?kindly_theme_preview=1. For an administrator only, it uses the saved design draft in place of the published design (pre_option_cantata_client_design) and hides the admin bar.

Function reference#

Function Does
cantata_edit_theme_settings_available(): bool Whether the active theme provides the client design document (cantata_design_get, cantata_design_validate, cantata_design_token_spec). The screen and routes exist only then.
cantata_edit_theme_previewing(): bool Whether this front-end request is an administrator's draft preview.
cantata_edit_theme_settings_run( callable $step, array $input ) Runs one design step as a person on the screen (cantata_edit_design_manual( true )), so AI access is not required.
cantata_edit_theme_settings_state( array $doc ): array The design document plus the addresses of its logo and default picture.
cantata_edit_theme_settings_sections(): array Every section the theme offers, including ones the design has turned off.
cantata_edit_theme_settings_fonts(): array The font tiles offered on the Type tab.
cantata_edit_theme_settings_page(): void Prints the screen; needs manage_options. Since 0.9.21 its title has the Theme settings video button (training).

includes/theme-design.php adds cantata_edit_design_manual( ?bool $set = null ): bool, which marks a request as a person on this screen rather than an AI tool.

Source: includes/kindly-theme.php, assets/kindly-theme.js, assets/kindly-theme.css.

About this page

Documents Kindly Edit 0.9.16. Source: includes/kindly-theme.php. Theme choices and account permissions can change which controls appear.

Type a word or phrase to search the full documentation.