Kindly EditDocumentationTry the editor

advanced-code-api.php

Exposes authorized element-code reads and draft writes. It requires a Kindly-built owner and delegates persistence to the normal atomic save path rather than turning an unrelated WordPress page into a built page.

Responsibility#

Exposes authorized element-code reads and draft writes. It requires a Kindly-built owner and delegates persistence to the normal atomic save path rather than turning an unrelated WordPress page into a built page.

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.

abilities, blocks-mode, build-contract, editor, element-php, page-model, render, rest.

WordPress hooks#

Operation Hook
add_action rest_api_init
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_advanced_code_permission#

function cantata_edit_advanced_code_permission( int $id = 0 ): bool

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_can_dev.

Source location: includes/advanced-code-api.php:5.

cantata_edit_advanced_code_built#

function cantata_edit_advanced_code_built( WP_Post $post )

Element code lives in a Kindly-built page's own markup. A WordPress-editor, block or not-yet-built page has none, and a code write must never turn it into a built page (that would change the live page while only saving a draft).

Implementation connections: cantata_edit_blocks_mode, cantata_edit_is_built.

Source location: includes/advanced-code-api.php:14.

cantata_edit_advanced_code_read#

function cantata_edit_advanced_code_read( int $id )

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_advanced_code_built, cantata_edit_advanced_code_permission, cantata_edit_ai_source, cantata_edit_build_contract, cantata_edit_element_php_verify, cantata_edit_page_rev.

Source location: includes/advanced-code-api.php:22.

cantata_edit_advanced_code_write#

function cantata_edit_advanced_code_write( array $in )

Changes one explicit exception owner and delegates persistence to the normal atomic draft save.

Implementation connections: cantata_edit_advanced_code_built, cantata_edit_advanced_code_permission, cantata_edit_advanced_code_read, cantata_edit_ai_audit, cantata_edit_ai_can, cantata_edit_ai_source, cantata_edit_build_contract, cantata_edit_page_rev, cantata_edit_rest_save.

Source location: includes/advanced-code-api.php:47.

About this page

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

Type a word or phrase to search the full documentation.