/** * return if the current day is today * * @return bool */ function tribe_events_week_is_current_today() { $week_days = Tribe_Events_Pro_Week_Template::get_week_days(); $status = !empty($week_days[Tribe_Events_Pro_Week_Template::get_current_day()]->today) ? $week_days[Tribe_Events_Pro_Week_Template::get_current_day()]->today : false; return apply_filters('tribe_events_week_is_current_today', $status); }
/** * For use within the week view template to determine if the current day in the * loop contains events. * * @return bool */ function tribe_events_current_week_day_has_events() { // Do we have any all day events taking place today? $day_counter = Tribe_Events_Pro_Week_Template::get_current_day(); $map = tribe_events_week_get_all_day_map(); if (null !== $map[0][$day_counter]) { return true; } // Do we have any hourly events taking place today? $hourly = Tribe_Events_Pro_Week_Template::get_events('hourly_map'); return empty($hourly[$day_counter]) ? false : true; }