diff --git a/front-page.php b/front-page.php index 360fcc5..5530a25 100644 --- a/front-page.php +++ b/front-page.php @@ -4,9 +4,20 @@ '2024-11-02 10:00:00', +]; + $blog_slug = get_blog_slug(); -if ($blog_slug === '2024') { +if (array_key_exists($blog_slug, $eventStartTimes)) { + $now = new DateTimeImmutable('now'); + $eventStart = new DateTimeImmutable($eventStartTimes[$blog_slug] . ' Europe/Sofia'); + $interval = $now->diff($eventStart); +} + +if ($interval instanceof DateInterval && $interval->invert === 0) { ?>