/** * Generates html for any notices that have been queued on the current view * * @param bool $echo Whether or not to echo the notices html * * @return void | string * @see TribeEvents::getNotices() **/ function tribe_events_the_notices($echo = true) { $notices = TribeEvents::getNotices(); $html = !empty($notices) ? '<div class="tribe-events-notices"><ul><li>' . implode('</li><li>', $notices) . '</li></ul></div>' : ''; $the_notices = apply_filters('tribe_events_the_notices', $html, $notices); if ($echo) { echo $the_notices; } else { return $the_notices; } }