/** * get event object * * @since 3.0 * @author tim@imaginesimplicty.com * @return object */ function tribe_events_week_get_event() { switch (Tribe_Events_Pro_Week_Template::$loop_type) { case 'allday': $event = Tribe_Events_Pro_Week_Template::get_allday_event(); Tribe_Events_Pro_Week_Template::$event_key_track[] = Tribe_Events_Pro_Week_Template::get_event_id(); break; case 'hourly': $event = Tribe_Events_Pro_Week_Template::get_hourly_event(); break; } return apply_filters('tribe_events_week_get_event', $event); }
/** * set the internal event id for tracking between methods/templates * * @since 3.0 * @author tim@imaginesimplicty.com * @param int $event_id */ public static function set_event_id($event_id) { self::$event_id = $event_id; }
/** * provide a clean way to reset the counter for the all day map row iterator * * @return void * @deprecated * @todo remove in 4.0 */ function tribe_events_week_reset_the_day_map() { _deprecated_function(__FUNCTION__, 3.1, 'rewind_days'); Tribe_Events_Pro_Week_Template::rewind_days(); }
/** * set the internal event id for tracking between methods/templates * * @since 3.0 * @author tim@imaginesimplicty.com * @param int $event_id */ function set_event_id($event_id) { self::$event_id = $event_id; }
/** * 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; }