Basic Details
Plugin Author(s): Popup Maker
First Discovered: Saturday, March 14, 2020
Free Version?: Yes
Premium Version?: Yes
My Rating: ★★★★★
General Description & Notes
I rediscovered this on 3/14/20 after having disappointing experience with TimerSys Popup / WP Popups.
I like!
Date Conditions Hack, at Creatures
Here’s my code for custom date window condition:
NOTE: Wish to heck I had documented where I found the clues for doing this…
It may be this one…
function pum_time_window_condition( $conditions = array() ) { return array_merge( $conditions, array( 'date_win' => array( // The ID for the condition 'group' => __( 'General', 'popup-maker' ), // The section within the conditions drop-down to add this condition to. 'name' => __( 'Date Range', 'popup-maker' ), // The name that appears to admins when selecting the condition. 'priority' => 10, // The priority determines the order the conditions are listed in within the group. Lower appears higher in the list. 'callback' => 'pum_time_window_condition_callback', // The function to call to determine the state of the condition. 'fields' => array( array('label' => 'Start Date (YYYY-MM-DD)', 'name' => 'start_date', 'type' => 'text'), array('label' => 'End Date (YYYY-MM-DD)', 'name' => 'end_date', 'type' => 'text'), ), // If you need to show a text box/drop-down to get input from the admin, you can pass fields here. ), )); } add_filter( 'pum_registered_conditions', 'pum_time_window_condition' );
And the callback:
/** * Determines if today is within the date window * @param array $condition The condition settings, including input into any `fields`, if registered with the condition. * @param array $popup The current popup that is being checked. * @return bool */ function pum_time_window_condition_callback( $condition, $popup ) { if ( !isset($condition) ) { return true; } $today = date('Y-m-d'); if ( $today >= $condition[0] && $today <= $condition[1] ) { return true; } return false; }
Pros
- Simple, Intuitive
- Themes: Comes with 6 pre-set themes; you can add new
- 16 extensions, available for $192/year (e.g., Scheduling)
- Support seems good: 41/48 issues resolved in last 2 months
- Can customize to create DATE-WINDOW condition!
Cons
- Lacks some features the free version of Timersys Popups has (scroll percentage)
Web Sites
- https://wordpress.org/plugins/popup-maker/
WordPress Repository - https://wppopupmaker.com/
Plugin Proprietery Site
Notable Installations
- https://saplings-school.com/ - First test case, on Programs page
- SJ Pizza http://sjwoodfiredpizza.com - For their delivery services at 3/21/20
- JeffCohan.net/Creatures - Implemented custom date-window condition!