Esempio n. 1
0
 /**
  * Gets all events in the current month, matching those presented in month view
  * by default (and therefore potentially including some events from the tail end
  * of the previous month and start of the following month).
  *
  * We build a fresh 'custom'-type query here rather than taking advantage of the
  * main query since page spoofing can render the actual query and results
  * inaccessible (and it cannot be recovered via a query reset).
  *
  * @return array events in the month
  */
 private static function get_month_view_events()
 {
     global $wp_query;
     $event_date = $wp_query->get('eventDate');
     $month = empty($event_date) ? tribe_get_month_view_date() : $wp_query->get('eventDate');
     $args = array('eventDisplay' => 'custom', 'start_date' => Tribe__Events__Template__Month::calculate_first_cell_date($month), 'end_date' => Tribe__Events__Template__Month::calculate_final_cell_date($month), 'posts_per_page' => -1, 'hide_upcoming' => true);
     /**
      * Provides an opportunity to modify the query args used to build a list of events
      * to export from month view.
      *
      * This could be useful where its desirable to limit the exported data set to only
      * those events taking place in the specific month being viewed (rather than an exact
      * match of the events shown in month view itself, which may include events from
      * adjacent months).
      *
      * @var array  $args
      * @var string $month
      */
     $args = (array) apply_filters('tribe_ical_feed_month_view_query_args', $args, $month);
     return tribe_get_events($args);
 }
 /**
  * Rewind the posts and reset post index.
  *
  */
 public static function rewind_days()
 {
     self::$current_day = -1;
     self::$current_week = -1;
 }
Esempio n. 3
0
 /**
  * Used in the month loop.
  * Outputs classes for the current single event in the month loop
  *
  * @return void
  * @see Tribe__Events__Template__Month::event_classes()
  **/
 function tribe_events_the_month_single_event_classes()
 {
     echo apply_filters('tribe_events_the_month_single_event_classes', Tribe__Events__Template__Month::event_classes());
 }