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_enabled()
Retrieves the ‘enabled’ meta key and returns true if popup is enabled
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) True if enabled
Source Source
File: classes/Model/Popup.php
public function is_enabled() { $enabled = $this->get_meta( 'enabled' ); // Post ID not valid. if ( false === $enabled ) { return false; } // If the key is missing... if ( '' === $enabled ) { // Set it to enabled. $enabled = 1; $this->update_meta( 'enabled', $enabled ); } else { // Else, load it in. $enabled = intval( $enabled ); if ( ! in_array( $enabled, array( 0, 1 ), true ) ) { $enabled = 1; } } if ( 1 === $enabled ) { return true; } else { return false; } }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
1.12 | Introduced. |