Skip to content

Instantly share code, notes, and snippets.

View marklchaves's full-sized avatar
🏄‍♂️

mark l chaves marklchaves

🏄‍♂️
View GitHub Profile
@marklchaves
marklchaves / schedule-a-popup.php
Last active September 8, 2021 05:38 — forked from waltermesser/schedule-a-popup.php
Popup Maker Plugin: A basic example of scheduling a popup to display during a certain timeframe.
<?php // Ignore this first line when copying to your child theme's functions.php file.
function schedule_my_popup( $is_loadable, $popup_id ) {
if( $popup_id == 14 ) { // Change to your popup ID.
date_default_timezone_set('Asia/Singapore'); // Change to your time zone.
$now = strtotime( 'now' );
$start = strtotime( 'September 8, 2021 12:00PM' ); // Change to your local start time.