The function espresso_event_status() in public\template_tags.php always echo’s the status, unless it’s ‘inactive’. This is because EEH_Event_View::event_active_status is called without passing $echo, which in turn either returns ‘inactive’ (no problem here) or calls $event->pretty_active_status(), again without the $echo var, and because that last one does take an $echo parameter, with a default of true, it always echo’s here.
So by adding an $echo param and passing it to “EEH_Event_View::event_active_status()” and having that function pass the $echo param on to $event->pretty_active_status(), everything works as intended.
The support post ‘[bug] function espresso_event_status always echo's (simple fix)’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.