intro.php
Tracks whether an authorized user has seen the editor introduction and provides the corresponding initial guidance.
Responsibility#
Tracks whether an authorized user has seen the editor introduction and provides the corresponding initial guidance.
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.
Module constants#
const CANTATA_EDIT_INTRO_META = 'cantata_edit_intro_seen';
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 |
|---|---|
apply_filters |
cantata_edit_intro_is_dev |
add_action |
rest_api_init |
add_filter |
rest_post_dispatch |
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_intro_can_edit#
function cantata_edit_intro_can_edit( int $user_id = 0 ): bool
Authors and scoped record editors need the same first-run guidance as page editors.
Source location: includes/intro.php:17.
cantata_edit_intro_seen#
function cantata_edit_intro_seen( int $user_id = 0 ): bool
Has this user seen the card? The meta holds the plugin version they saw it on.
Source location: includes/intro.php:28.
cantata_edit_intro_mark_seen#
function cantata_edit_intro_mark_seen( 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.
Source location: includes/intro.php:33.
cantata_edit_intro_config#
function cantata_edit_intro_config( int $user_id = 0 ): array
For the editor config (C.intro). Developer mode never shows it: until the mode switch exists, the cantata_edit_intro_is_dev filter answers that (false, Simple, for everyone).
Implementation connections: cantata_edit_intro_can_edit, cantata_edit_intro_mark_seen, cantata_edit_intro_seen.
Source location: includes/intro.php:46.