Skip to content

Instantly share code, notes, and snippets.

@waltermesser
Last active December 10, 2021 08:47
Show Gist options
  • Save waltermesser/a450c63c39252a1a4e31c835f45052d4 to your computer and use it in GitHub Desktop.
Save waltermesser/a450c63c39252a1a4e31c835f45052d4 to your computer and use it in GitHub Desktop.
<?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