/** * Display a month * * Inline example: * < code > * <?php * // output the events in May 2016 using the full month view template * tribe_show_month( array( 'eventDate' => '2016-05-01' ) ) * ?> * </ code > * * @param array $args query args to pass to the month view * @param string $template_path template to use, defaults to the full month view * * @return void **/ function tribe_show_month($args = array(), $template_path = 'month/content') { // temporarily unset the tribe bar params so they don't apply $hold_tribe_bar_args = array(); foreach ($_REQUEST as $key => $value) { if ($value && strpos($key, 'tribe-bar-') === 0) { $hold_tribe_bar_args[$key] = $value; unset($_REQUEST[$key]); } } $month_class = new Tribe__Events__Template__Month($args); $month_class->setup_view(); do_action('tribe_events_before_show_month'); tribe_get_template_part($template_path); do_action('tribe_events_after_show_month'); $month_class->shutdown_view(); // reinstate the tribe bar params if (!empty($hold_tribe_bar_args)) { foreach ($hold_tribe_bar_args as $key => $value) { $_REQUEST[$key] = $value; } } }