theme-design.php
Reads, validates, drafts, publishes, and discards the active theme’s structured design document through the authorized integration interface.
Responsibility#
Reads, validates, drafts, publishes, and discards the active theme’s structured design document through the authorized integration interface.
This is an implementation reference for the released 0.9.13 module. Internal PHP helpers are not a compatibility promise for third-party callers. Prefer the documented REST, Abilities, theme, and filter contracts.
Related modules#
Module constants#
const CANTATA_EDIT_DESIGN_DRAFT = 'cantata_client_design_draft';
These values describe this release. Defined configuration constants and generated identifiers can have different ownership; do not edit stored values directly without following the corresponding workflow.
WordPress hooks#
| Operation | Hook |
|---|---|
add_action |
wp_abilities_api_init |
add_action and add_filter subscribe to a hook; do_action and apply_filters expose a hook. A subscription is not itself a new extension API. Dynamic hook names are not included in this literal inventory.
Function and method reference#
cantata_edit_design_can#
function cantata_edit_design_can()
Internal implementation helper in this module. Its name and signature identify the operation and accepted PHP values; it is not a standalone authenticated endpoint.
Implementation connections: cantata_edit_ai_can.
Source location: includes/theme-design.php:11.
cantata_edit_design_document#
function cantata_edit_design_document( string $version = 'draft' )
Internal implementation helper in this module. Its name and signature identify the operation and accepted PHP values; it is not a standalone authenticated endpoint.
Implementation connections: cantata_edit_design_can.
Source location: includes/theme-design.php:25.
cantata_edit_design_validate_input#
function cantata_edit_design_validate_input( array $input )
Internal implementation helper in this module. Its name and signature identify the operation and accepted PHP values; it is not a standalone authenticated endpoint.
Implementation connections: cantata_edit_design_can.
Source location: includes/theme-design.php:48.
cantata_edit_design_save_draft#
function cantata_edit_design_save_draft( array $input )
Internal implementation helper in this module. Its name and signature identify the operation and accepted PHP values; it is not a standalone authenticated endpoint.
Implementation connections: cantata_edit_design_document, cantata_edit_design_validate_input.
Source location: includes/theme-design.php:57.
cantata_edit_design_publish#
function cantata_edit_design_publish( array $input )
Internal implementation helper in this module. Its name and signature identify the operation and accepted PHP values; it is not a standalone authenticated endpoint.
Implementation connections: cantata_edit_design_document.
Source location: includes/theme-design.php:74.
cantata_edit_design_discard#
function cantata_edit_design_discard( array $input )
Internal implementation helper in this module. Its name and signature identify the operation and accepted PHP values; it is not a standalone authenticated endpoint.
Implementation connections: cantata_edit_ai_audit, cantata_edit_ai_rate_gate, cantata_edit_design_can, cantata_edit_design_document.
Source location: includes/theme-design.php:93.