Created
April 23, 2020 01:52
-
-
Save joshfeck/00dcad9b8c2cab55285afeb5e3cfb068 to your computer and use it in GitHub Desktop.
Show a message when it's an expired event. Event Espresso 4.
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 | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
add_action( | |
'AHEE_event_details_after_event_date', | |
function($post) { | |
$event = EEH_Event_View::get_event($post->id); | |
$status = $event instanceof EE_Event ? $event->get_active_status() : ''; | |
if ($status == 'DTE') { | |
echo '<h4>This event is expired and not part of the 2020 schedule.</h4>'; | |
} | |
}, | |
10 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment