Exemplo n.º 1
0
 /**
  * get array of hourly event objects
  *
  * @since  3.0
  * @author tim@imaginesimplicty.com
  * @return array of hourly event objects
  */
 function tribe_events_week_get_hourly()
 {
     $hourly_events = (array) Tribe_Events_Pro_Week_Template::get_events('hourly');
     return apply_filters('tribe_events_week_get_hourly', $hourly_events);
 }
Exemplo n.º 2
0
 /**
  * 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;
 }