Add donation alerts during the holidays

This commit is contained in:
Alex Cabal 2020-12-22 20:01:03 -06:00
parent b07f406d9f
commit 0e7100cfe8
5 changed files with 77 additions and 0 deletions

View file

@ -34,6 +34,9 @@ const AVERAGE_READING_WORDS_PER_MINUTE = 275;
define('PD_YEAR', intval(gmdate('Y')) - 96);
const DONATION_ALERT_ALWAYS_ON = false;
const DONATION_ALERT_ON_DURING_HOLIDAYS = true;
define('DONATION_ALERT_ON', DONATION_ALERT_ALWAYS_ON | (DONATION_ALERT_ON_DURING_HOLIDAYS && (strtotime('December 1, ' . gmdate('Y')) < time() && time() < strtotime('January 7, ' . (intval(gmdate('Y') + 1))))));
// No trailing slash on any of the below constants.
const SITE_URL = 'https://standardebooks.org';
const SITE_ROOT = '/standardebooks.org';