Last active
December 10, 2021 08:47
-
-
Save waltermesser/a450c63c39252a1a4e31c835f45052d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment