Kindly EditDocumentationTry the editor

conditions.php

Validates serialized visibility rules, evaluates them in the visitor context, omits nonmatching HTML, and marks visitor-dependent output as unsuitable for ordinary shared caching.

Responsibility#

Validates serialized visibility rules, evaluates them in the visitor context, omits nonmatching HTML, and marks visitor-dependent output as unsuitable for ordinary shared caching.

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.

linked-components, render.

WordPress hooks#

Operation Hook
add_action template_redirect

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

function cantata_edit_condition_types(): array

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/conditions.php:19.

cantata_edit_conditions_parse#

function cantata_edit_conditions_parse( string $json )

The conditions made valid, or WP_Error saying what is wrong.

Implementation connections: cantata_edit_condition_types.

Source location: includes/conditions.php:24.

cantata_edit_condition_true#

function cantata_edit_condition_true( array $c ): bool

Whether one condition holds for this request.

Source location: includes/conditions.php:68.

cantata_edit_conditions_true#

function cantata_edit_conditions_true( array $set ): bool

Whether a parsed set of conditions shows the element: any group with all of its conditions true.

Implementation connections: cantata_edit_condition_true.

Source location: includes/conditions.php:106.

cantata_edit_conditions_render#

function cantata_edit_conditions_render( string $html ): string

Visitors' pages leave out elements whose conditions are false; the page is sent uncacheable when they depend on the person, time or referrer.

Implementation connections: cantata_edit_conditions_parse, cantata_edit_conditions_true, cantata_edit_is_editing, cantata_edit_linked_inner, cantata_edit_linked_parse.

Source location: includes/conditions.php:116.

cantata_edit_conditions_personal#

function cantata_edit_conditions_personal( string $html ): 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_conditions_parse.

Source location: includes/conditions.php:137.

cantata_edit_conditions_strip#

function cantata_edit_conditions_strip( string $html ): string

Shared summaries (excerpts, search results, SEO and social descriptions) leave out every element with conditions, for anyone.

Implementation connections: cantata_edit_linked_inner, cantata_edit_linked_parse.

Source location: includes/conditions.php:155.

About this page

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

Type a word or phrase to search the full documentation.