scheduled pop-up window
Please tell me, I have a notification window made on Popup Maker popmake-2324, id 2324. But the plugin doesn't have the schedule option. I need the window to appear every day from 22 pm to 12 am. I found the code in the same plugin (see below), inserted it in functions.php changed to your id and time, but it doesn't work. Can someone tell me what the error is or what is missing, or how it can be implemented differently? here is a sample code:
<? php
function schedule_my_popup( $is_loadable, $popup_id ) {
if( $popup_id == 123 ) {
$start = strtotime( 'May 4, 2016 11:59AM' );
$end = strtotime( 'May 5, 2016 11:59AM' );
$now = strtotime( 'now' );
if( $now >= $start && $now <= $end ) {
return true;
}
else {
return false;
}
}
return $is_loadable;
}
add_filter( 'popmake_popup_is_loadable', 'schedule_my_popup', 1000 );