Content Visibility for Divi Builder
Content Visibility for Divi Builder allows Sections and Modules to be displayed/hidden based on the outcome of a PHP boolean expression. This plugin is for both the standalone Divi theme (or child themes thereof) and the Divi Builder plugin, version 3 or higher! Developer Filters Expression Validation Filters The following filters allow developers to customize expression validation behavior. Add these filters in your theme’s functions.php or in a custom plugin. content_visibility_for_divi_builder_blocked_functions Filter the array of blocked function names. Functions in this list will cause an expression to fail validation. All comparisons are case-insensitive. Example – allow file_get_contents (blocked by default): add_filter( 'content_visibility_for_divi_builder_blocked_functions', function( $functions ) { return array_diff( $functions, array( 'file_get_contents' ) ); } ); Example – block an additional function: add_filter( 'content_visibility_for_divi_builder_blocked_functions', function( $functions ) { $functions[] = 'my_dangerous_function'; return $functions; } ); content_visibility_for_divi_builder_allowed_tokens Filter the array of allowed PHP token types (T_* constants). Tokens not in this list will cause an expression to fail validation. This is an advanced filter – consult the PHP tokenizer documentation before modifying. Example – allow the T_VARIABLE token type (blocked by default, use with caution): add_filter( 'content_visibility_for_divi_builder_allowed_tokens', function( $tokens ) { $tokens[] = T_VARIABLE; return $tokens; } ); content_visibility_for_divi_builder_allowed_chars Filter the array of allowed single-character tokens. Characters not in this list (such as =, ;, {, }, `, @, &, |, ~, ^) will cause an expression to fail validation. Example – allow the & character for bitwise operations: add_filter( 'content_visibility_for_divi_builder_allowed_chars', function( $chars ) { $chars[] = '&'; return $chars; } ); content_visibility_for_divi_builder_allowed_callables Filter the array of callables (function names and Class::method static-method entries) the validator considers known-safe. Anything not on the allowlist (and not on the blocked_functions denylist) is treated as an “Unknown callable” error. Names are normalized (leading \ stripped, namespace\ keyword prefix stripped, lowercased) before comparison, so \My\Namespace\Class::method, My\Namespace\Class::method, and namespace\My\Namespace\Class::method all match the same allowlist entry. The default list ships with WordPress conditional tags (is_user_logged_in, current_user_can, is_admin, etc.). The Expression Validation tab’s content scanner generates a ready-to-paste snippet for this filter pre-populated with every custom callable currently in your content. Example – allowlist a theme helper and a static service method: add_filter( 'content_visibility_for_divi_builder_allowed_callables', function( $callables ) { $callables[] = 'mytheme_should_be_visible'; $callables[] = 'MyTheme\Visibility\Service::checkUser'; return $callables; } );
Ele Conditions for Elementor
Ele Conditions for Elementor turns static Elementor elements into interactive, context-aware components — without writing a single line of code. There are two independent systems, both accessible from the Advanced tab of any widget, section, or container: ⚡ Triggers & Actions (client-side, no page reload) Attach one or more trigger → action pairs to any element. 10 trigger types: Click — user clicks the element Hover — user hovers over the element Delay on load — fires after X milliseconds from page load Scroll into view — fires once when the element enters the viewport Time on page — fires after X seconds the visitor has been on the page Exit intent — fires when the cursor moves toward closing the tab First visit — fires only on the visitor’s very first page load (localStorage) Nth visit — fires on the Nth page load (visit counter in localStorage) A/B Group A / B — fires for visitors randomly assigned to group A or B (persists via localStorage) 9 action types: Show — make the target element visible Hide — hide the target element Toggle — toggle visibility on each trigger Add / Remove / Toggle Class — apply a CSS class (great for CSS animations) Scroll To — smooth-scroll the page to the target element Focus — set browser focus on the target (input fields, etc.) Close Others in Group — hide all siblings sharing a CSS class (accordion pattern) Target selector: leave empty to act on the element itself, or enter any CSS selector to act on another element anywhere on the page. Hide Initially: a dedicated switcher that hides the element on load independently of triggers — useful for elements revealed by a trigger. 🎛 Display Conditions (server-side, evaluated at render time) Show or hide elements based on variables, rules, and time windows. Multiple conditions per element with AND / OR logic. Built-in variables include: user_role, is_logged_in, user_id, post_type, post_status, post_age_days, post_word_count, post_has_thumbnail, cart_count, cart_total, current_hour, current_day, current_month, current_year, utm_source, utm_medium, utm_campaign, utm_content, utm_term, and more. Condition types: Simple — compare a variable to a value using ==, !=, >, =, <=, contains, starts_with, ends_with, empty, not_empty Time interval — show element only between two times of day (supports cross-midnight ranges) Date/datetime interval — show element only within a date or datetime window Custom variables — register your own variables via the eleconditions_vars filter in your theme’s functions.php. ACF support — pick any ACF field from a searchable dropdown; the value is fetched at render time. User meta — condition on any WordPress user meta key for the current visitor. Debug mode — shows a red-bordered overlay with the evaluated variable values, visible only to editors and administrators. Developer-friendly Zero dependencies beyond Elementor Fully filterable variable system No inline styles injected into saved content — everything is evaluated at render Note: Requires the free Elementor plugin.