Kindly EditDocumentationTry the editor

editor.php

Decides when the editing interface loads, prepares its configuration, enqueues editor assets, and supplies the editable page context.

Responsibility#

Decides when the editing interface loads, prepares its configuration, enqueues editor assets, and supplies the editable page context.

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.

blocks-mode, blocks, branding, design-system, element-css, element-js, element-php, globals, help, icon-library, intro, kindly-menu, labels, parts, popups, render, responsive, rest, seo, theme-templates, theme, tones.

Literal option and cache keys#

page_for_posts, page_on_front, show_on_front. These are direct literal keys found in this module; dynamically constructed keys and metadata constants are covered by the storage reference.

WordPress hooks#

Operation Hook
add_action template_redirect
apply_filters cantata_edit_can_open_editor
add_action wp_footer
add_filter show_admin_bar
add_action wp_enqueue_scripts
add_filter body_class
add_action template_redirect
apply_filters cantata_edit_developer_mode_cap
add_filter cantata_edit_intro_is_dev

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_enqueue#

function cantata_edit_enqueue(): void

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_asset_ver, cantata_edit_block_styles, cantata_edit_block_transient, cantata_edit_blocks, cantata_edit_blocks_mode, cantata_edit_brand, cantata_edit_branding, cantata_edit_can_author_css, cantata_edit_can_author_js, cantata_edit_can_design, cantata_edit_can_dev, cantata_edit_can_globals, cantata_edit_can_popups, cantata_edit_can_themes, cantata_edit_can_trash, cantata_edit_config, cantata_edit_design_system, cantata_edit_design_system_rev, cantata_edit_device_canvas, cantata_edit_element_php_editor_config, cantata_edit_has_draft, cantata_edit_help_url, cantata_edit_history_url, cantata_edit_icon_library, cantata_edit_intro_config, cantata_edit_is_built, cantata_edit_is_dev_mode, cantata_edit_live_sources, cantata_edit_menu_list_for, cantata_edit_native_behavior_sources, cantata_edit_part_draft, cantata_edit_part_other_drafts, cantata_edit_popup_defaults, cantata_edit_popup_devices, cantata_edit_popup_schema, cantata_edit_preview_inline, cantata_edit_preview_styles, cantata_edit_revs, cantata_edit_screens, cantata_edit_section_shell, cantata_edit_seo_live, cantata_edit_seo_plugin, cantata_edit_seo_values, cantata_edit_stage_label, cantata_edit_theme_kind, cantata_edit_theme_sample_info.

Source location: includes/editor.php:47.

cantata_edit_lock#

function cantata_edit_lock( int $id, string $take = '' ): array

WordPress's own post lock, so wp-admin and ?edit see each other ("Cam is editing this page" in both). The editor takes the lock when it opens, unless someone else holds it; then it gets their name and a take-over link (with a nonce, like wp-admin's "Take over"). While open, editor.js sends the lock on WordPress's heartbeat ('wp-refresh-post-lock', handled by core's wp_refresh_post_lock) so it doesn't expire.

Source location: includes/editor.php:245.

cantata_edit_can_dev#

function cantata_edit_can_dev( int $user_id = 0 ): bool

Developer mode: the whole builder (select anything, move, copy, every block and setting). It's for people who can manage the site (filter cantata_edit_developer_mode_cap to change who), switched on in the editor's ⋯ menu and remembered per person. Everyone else, and everyone by default, gets Simple: click words, buttons and pictures.

Source location: includes/editor.php:278.

cantata_edit_is_dev_mode#

function cantata_edit_is_dev_mode( int $user_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/editor.php:282.

cantata_edit_device_canvas#

function cantata_edit_device_canvas( int $user_id = 0 ): bool

Whether Developer mode shows Tablets and Phones on an editable canvas of that width (assets/editor.js, deviceCanvas). A per-person editor preference, on unless that person turned it off; it never changes what visitors see.

Implementation connections: cantata_edit_is_dev_mode.

Source location: includes/editor.php:299.

cantata_edit_can_trash#

function cantata_edit_can_trash( $post ): bool

The ⋯ menu's "Move this page to the Trash": someone who may delete this page, and never the home page or the posts page.

Source location: includes/editor.php:307.

About this page

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

Type a word or phrase to search the full documentation.