Yangra Conditional 1.0.0 has 7 actions and 23 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Yangra Conditional fires an action
add_action( 'yangra_conditional_admin_app_enqueued', function( $name, $handle ) {
// Your code runs here.
}, 10, 2 );
// Change a value Yangra Conditional is about to use
add_filter( 'yangra_conditional_caching_plugins', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Fires after an admin app's script and styles are enqueued. Pro loads its * additions to an app here, e.g. to the classic rule fields. */ do_action( 'yangra_conditional_admin_app_enqueued', $name, $handle ); -
/** * Filters the page caching plugins the Dashboard warns about. */ apply_filters( 'yangra_conditional_caching_plugins', self::CACHING_PLUGINS ); -
/** * Filters the condition types that get the page caching warning. Pro adds its * own. */ apply_filters( 'yangra_conditional_caching_sensitive_types', array( 'visitor_device' ) ); -
/** * Filters the warnings and tips shown next to a condition. Pro adds them for * its own conditions. */ apply_filters( 'yangra_conditional_condition_notices', $type_notices, $type ); -
/** * Filters the condition types that can be checked, keyed by type ID. */ apply_filters( 'yangra_conditional_condition_types', $free ); -
/** * Filters whether countdown blocks and shortcodes are active. Pro returns * true. */ apply_filters( 'yangra_conditional_countdowns_active', false ); -
/** * Filters extra Dashboard notices. Each notice is an array with: */ apply_filters( 'yangra_conditional_dashboard_notices', array() ); -
/** * Filters the default settings. */ apply_filters( 'yangra_conditional_default_settings', array( 'show_visibility_badges' => true, 'admin_bar_preview' => true, ) ); -
/** * Filters the links to the screens the docs mention, for the current user. Pro * adds its own screens. */ apply_filters( 'yangra_conditional_docs_links', $links ); -
/** * Fires after Yangra Conditional has registered its services. */ do_action( 'yangra_conditional_loaded', $this ); -
/** * Fires after scheduled content purged its target pages. Pro keeps a history. */ do_action( 'yangra_conditional_post_purged', $post_id, $purge ); -
/** * Filters what "Preview as" offers. Pro adds its visitor conditions here. */ apply_filters( 'yangra_conditional_preview_groups', $groups ); -
/** * Filters the values being previewed, as group key => value. */ apply_filters( 'yangra_conditional_preview_values', array() ); -
/** * Filters the suggested privacy policy text, as a list of HTML paragraphs. Pro * adds paragraphs about the data its features read and store. */ apply_filters( 'yangra_conditional_privacy_policy_content', $paragraphs ); -
/** * Fires when scheduled content purges a post, so a host or another plugin can * purge its own cache. */ do_action( 'yangra_conditional_purge_post', $post_id ); -
/** * Fires after a rule's condition groups in the classic rule fields (Appearance * → Menus, widget forms). Pro adds its "Add OR group" button here. */ do_action( 'yangra_conditional_rule_fields_after_groups', $name, $this ); -
/** * Filters sanitized settings before they are saved. Use this to sanitize extra * keys. */ apply_filters( 'yangra_conditional_sanitize_settings', $clean, $input ); -
/** * Filters the data printed for the scheduled elements script. Pro adds `now` * (ms) while an admin previews a date and time: the script's clock starts * there instead of at the visitor's time. */ apply_filters( 'yangra_conditional_schedule_runtime_data', array( 'schedules' => $schedules ), $queried ); -
/** * Filters the markup a scheduled content item's rendered blocks may contain, * in the format `wp_kses()` takes. Anything else is removed. */ apply_filters( 'yangra_conditional_scheduled_content_allowed_html', $tags ); -
/** * Filters the page caches scheduled content purges. */ apply_filters( 'yangra_conditional_scheduled_content_caches', $caches ); -
/** * Filters whether visitor conditions on scheduled content items are applied. * Pro returns true. */ apply_filters( 'yangra_conditional_scheduled_content_conditions_active', false ); -
/** * Filters the time scheduled content is rendered at. Pro sets it while a user * previews a date and time. */ apply_filters( 'yangra_conditional_scheduled_content_now', null ); -
/** * Filters an item's settings before they're saved. Pro adds its own fields. */ apply_filters( 'yangra_conditional_scheduled_content_sanitize', $settings, $input, $post_id ); -
/** * Filters whether an active scheduled content item is shown on a page. Pro * uses it for visitor conditions. */ apply_filters( 'yangra_conditional_scheduled_content_should_render', true, $item, $post_id ); -
/** * Filters the shortcode attributes that are conditions. Pro adds its own. */ apply_filters( 'yangra_conditional_shortcode_attributes', self::FREE_ATTRIBUTES ); -
/** * Filters the block types that don't get the Visibility panel and rule * attribute. */ apply_filters( 'yangra_conditional_visibility_excluded_block_types', self::EXCLUDED ); -
/** * Filters the classic widget types (id_base) that don't get visibility rules. */ apply_filters( 'yangra_conditional_visibility_excluded_widget_types', self::EXCLUDED ); -
do_action( 'litespeed_purge_url', $url ); -
apply_filters( 'the_title', $title, (int) $item->ID ); -
do_action( 'yangra_conditional_fs_loaded' );
Generated from Yangra Conditional's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: