Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Model_Popup::is_loadable()
Returns whether or not the popup is visible in the loop.
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Return Return
(bool)
Source Source
File: classes/Model/Popup.php
public function is_loadable() { // Loadable defaults to true if no conditions. Making the popup available everywhere. $loadable = true; if ( ! $this->ID ) { return false; // Published/private } $filters = array( 'php_only' => true ); if ( $this->has_conditions( $filters ) ) { // All Groups Must Return True. Break if any is false and set $loadable to false. foreach ( $this->get_conditions( $filters ) as $group => $conditions ) { // Groups are false until a condition proves true. $group_check = false; // At least one group condition must be true. Break this loop if any condition is true. foreach ( $conditions as $condition ) { // If any condition passes, set $group_check true and break. if ( ! $condition['not_operand'] && $this->check_condition( $condition ) ) { $group_check = true; break; } elseif ( $condition['not_operand'] && ! $this->check_condition( $condition ) ) { $group_check = true; break; } } // If any group of conditions doesn't pass, popup is not loadable. if ( ! $group_check ) { $loadable = false; } } } return apply_filters( 'pum_popup_is_loadable', $loadable, $this->ID ); }
Expand full source code Collapse full source code View on Trac