function es_calendar($atts) { ob_start(); ?> <div class="tribe-header-nav"> <?php tribe_get_template_part('month/nav'); ?> </div> <div class="events-archive events-gridview"> <div id="tribe-events-content"> <div id="home-calendar"> </div> </div> </div> <?php $content = ob_get_contents(); ob_clean(); return $content; }
/** * Returns the placeholder HTML needed to embed a map within a page and * additionally enqueues supporting scripts, etc. * * @param int $post_id ID of the pertinent event or venue * @param int $width * @param int $height * @param bool $force_load add the map even if no address data can be found * * @return string */ public function get_map($post_id, $width, $height, $force_load) { $this->get_ids($post_id); // Bail if either the venue or event couldn't be determined if (!tribe_is_venue($this->venue_id) && !tribe_is_event($this->event_id)) { return apply_filters('tribe_get_embedded_map', ''); } $this->form_address(); if (empty($this->address) && !$force_load) { return apply_filters('tribe_get_embedded_map', ''); } $this->embedded_maps[] = array('address' => $this->address, 'title' => esc_html(get_the_title($this->venue_id))); end($this->embedded_maps); $index = key($this->embedded_maps); // Generate the HTML used to "house" the map ob_start(); tribe_get_template_part('modules/map', null, array('index' => $index, 'width' => null === $width ? apply_filters('tribe_events_single_map_default_width', '100%') : $width, 'height' => null === $height ? apply_filters('tribe_events_single_map_default_height', '350px') : $height)); $this->setup_scripts(); do_action('tribe_events_map_embedded', $index, $this->venue_id); return apply_filters('tribe_get_embedded_map', ob_get_clean()); }
/** * 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 * @author Jessica Yazbek * @since 3.0 **/ 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_Month_Template($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'); // reinstate the tribe bar params if (!empty($hold_tribe_bar_args)) { foreach ($hold_tribe_bar_args as $key => $value) { $_REQUEST[$key] = $value; } } }
do_action('tribe_events_after_loop'); ?> <?php } ?> <!-- List Footer --> <?php do_action('tribe_events_before_footer'); ?> <div id="tribe-events-footer"> <!-- Footer Navigation --> <?php do_action('tribe_events_before_footer_nav'); ?> <?php tribe_get_template_part('list/nav', 'footer'); ?> <?php do_action('tribe_events_after_footer_nav'); ?> </div> <!-- #tribe-events-footer --> <?php do_action('tribe_events_after_footer'); ?> </div><!-- #tribe-events-content -->
<?php echo $day['daynum']; ?> <?php } ?> </div> <!-- Events List --> <?php while ($day['events']->have_posts()) { $day['events']->the_post(); ?> <?php tribe_get_template_part('month/single', 'event'); ?> <?php } ?> <!-- View More --> <?php if ($day['view_more'] && tribe_events_is_view_enabled('day')) { ?> <div class="tribe-events-viewmore"> <?php $view_all_label = sprintf(_n('View 1 Event', 'View All %s Events', $day['total_events'], 'tribe-events-calendar'), $day['total_events']); ?> <a href="<?php echo $day['view_more'];
</h5> </div> <?php } ?> <!-- event --> <div id="post-<?php the_ID(); ?> " class="<?php tribe_events_event_classes($class); ?> "> <?php tribe_get_template_part('day/single', 'event-2'); ?> </div> <!-- .hentry .event --> <?php do_action('tribe_events_inside_after_loop'); ?> <?php } ?> </div> </div> <!-- .tribe-events-day-time-slot --> </div><!-- .tribe-events-loop -->
/** * Render additional field data within the single event view meta section. */ public function additional_fields() { tribe_get_template_part('pro/modules/meta/additional-fields', null, array('fields' => tribe_get_custom_fields())); }
/** * * returns the full markup for the AJAX Calendar * * @static * * @param array $args * -----> eventDate: date What month-year to print * count: int # of events in the list (doesn't affect the calendar). * tax_query: array For the events list (doesn't affect the calendar). * Same format as WP_Query tax_queries. See sample below. * * * tax_query sample: * * array( 'relation' => 'AND', * array( 'taxonomy' => 'tribe_events_cat', * 'field' => 'slug', * 'terms' => array( 'featured' ), * array( 'taxonomy' => 'post_tag', * 'field' => 'id', * 'terms' => array( 103, 115, 206 ), * 'operator' => 'NOT IN' ) ) ); * * */ public function do_calendar($args = array()) { $this->args = $args; // Disable tooltips $ecp = Tribe__Events__Pro__Main::instance(); $tooltip_status = $ecp->recurring_info_tooltip_status(); $ecp->disable_recurring_info_tooltip(); if (!isset($this->args['eventDate'])) { $this->args['eventDate'] = $this->get_month(); } // don't show the list if they set it the widget option to show 0 events in the list if ($this->args['count'] == 0) { $this->show_list = false; } // enqueue the widget js self::styles_and_scripts(); // widget setting for count is not 0 if (!$this->show_list) { add_filter('tribe_events_template_widgets/mini-calendar/list.php', '__return_false'); } tribe_get_template_part('pro/widgets/mini-calendar-widget'); if ($tooltip_status) { $ecp->enable_recurring_info_tooltip(); } }
tribe_get_template_part('pro/widgets/this-week/nav', 'header', array('start_date' => $this_week_template_vars['start_date'], 'end_date' => $this_week_template_vars['end_date'])); ?> <!-- This Week Grid --> <div class="tribe-this-week-widget-weekday-wrapper <?php echo esc_html('true' === $this_week_template_vars['hide_weekends'] ? 'tribe-this-week-widget-hide-weekends' : ''); ?> " > <?php foreach ($week_days as $day) { ?> <!-- This Week Day --> <?php tribe_get_template_part('pro/widgets/this-week/loop-grid-day', 'grid-dau', array('day' => $day, 'this_week_template_vars' => $this_week_template_vars)); ?> <?php } ?> </div> </div> <?php if ((isset($args['widget_id']) || isset($instance['widget_id'])) && (isset($instance['highlight_color']) && $instance['highlight_color'] != '')) { //Set Highlight Color for Widget or For Shortcode based on ID from Respective System $wrap_id = isset($args['widget_id']) ? $args['widget_id'] : ''; if (is_numeric($wrap_id)) {
?> " <?php //Add Day Name Option for Responsive Header if ($daydata['total_events'] > 0) { $day_name = tribe_event_format_date($daydata['date'], false); ?> data-date-name="<?php echo $day_name; ?> " <?php } ?> <?php } ?> > <?php tribe_get_template_part('month/single', 'day'); ?> </td> <?php } ?> </tr> </tbody> </table><!-- .tribe-events-calendar --> <?php do_action('tribe_events_after_the_grid');
// The URL for this widget's "View More" link. $link_to_all = tribe_events_get_list_widget_view_all_link($instance); // Check if any posts were found. if (isset($posts) && $posts) { foreach ($posts as $post) { setup_postdata($post); do_action('tribe_events_widget_list_inside_before_loop'); ?> <!-- Event --> <div class="<?php tribe_events_event_classes(); ?> "> <?php tribe_get_template_part('pro/widgets/modules/single-event', null, $instance); ?> </div><!-- .hentry .vevent --> <?php do_action('tribe_events_widget_list_inside_after_loop'); ?> <?php } ?> <p class="tribe-events-widget-link"> <a href="<?php esc_attr_e(esc_url($link_to_all)); ?>
<?php /** * Day View Template * The wrapper template for day view. * * Override this template in your own theme by creating a file at [your-theme]/tribe-events/day.php * * @package TribeEventsCalendar * */ if (!defined('ABSPATH')) { die('-1'); } do_action('tribe_events_before_template'); ?> <!-- Tribe Bar --> <?php tribe_get_template_part('modules/bar'); ?> <!-- Main Events Content --> <?php tribe_get_template_part('day/content'); ?> <div class="tribe-clear"></div> <?php do_action('tribe_events_after_template');
<div class="tribe-grid-content-wrap"> <?php while (tribe_events_week_have_days()) { tribe_events_week_the_day(); tribe_events_week_reset_the_day_map(); ?> <div title="<?php tribe_events_week_get_the_date(); ?> " class="tribe-events-mobile-day column <?php tribe_events_week_column_classes(); ?> "> <?php foreach (tribe_events_week_get_all_day_map() as $all_day_cols) { tribe_events_week_the_day_map(); ?> <?php tribe_get_template_part('pro/week/single-event', 'allday'); ?> <?php } ?> </div><!-- allday column --> <?php } ?> </div><!-- .tribe-grid-content-wrap --> </div><!-- .tribe-grid-allday --> <?php }
* @package TribeEventsCalendar * */ if (!defined('ABSPATH')) { die('-1'); } ?> <?php do_action('tribe_events_before_template'); ?> <!-- Google Map Container --> <?php tribe_get_template_part('pro/map/gmap-container'); ?> <!-- Tribe Bar --> <?php tribe_get_template_part('modules/bar'); ?> <!-- Main Events Content --> <?php tribe_get_template_part('pro/map/content'); ?> <div class="tribe-clear"></div> <?php do_action('tribe_events_after_template');
} } } } } ?> </h1> <?php if (is_single()) { $subtitle = types_render_field("subtitle", array("raw" => "true")); if (!empty($subtitle)) { echo "<h2 class='subtitle'>{$subtitle}</h2>"; } } if (tribe_is_month() || tribe_is_list_view()) { tribe_get_template_part('modules/bar'); } ?> </header> </div> <!-- end left block --> <?php } ?> <nav role="navigation" class="site-navigation"> <div class="home-page-link"><a href="<?php echo esc_url(home_url('/')); ?> " class="icon-home"><span>Home</span></a></div> <h1 class="assistive-text icon-menu"><span>Menu</span></h1> <div class="assistive-text skip-link"><a href="#content" title="Skip to content">Skip to content</a></div> <?php
/** * Returns the full address of an event along with HTML markup. It * loads the full-address template to generate the HTML */ public function fullAddress($post_id = null, $includeVenueName = false) { global $post; if (!is_null($post_id)) { $tmp_post = $post; $post = get_post($post_id); } ob_start(); tribe_get_template_part('modules/address'); $address = ob_get_contents(); ob_end_clean(); if (!empty($tmp_post)) { $post = $tmp_post; } return $address; }
?> <?php do_action('tribe_events_after_loop'); ?> <?php } ?> <!-- List Footer --> <?php do_action('tribe_events_before_footer'); ?> <div id="tribe-events-footer"> <!-- Footer Navigation --> <?php do_action('tribe_events_before_footer_nav'); ?> <?php tribe_get_template_part('pro/day/nav'); ?> <?php do_action('tribe_events_after_footer_nav'); ?> </div><!-- #tribe-events-footer --> <?php do_action('tribe_events_after_footer'); ?> </div><!-- #tribe-events-content -->
while (tribe_events_have_month_days()) { tribe_events_the_month_day(); ?> <?php if ($week != tribe_events_get_current_week()) { $week++; ?> </tr> <tr> <?php } ?> <td class="<?php tribe_events_the_month_day_classes(); ?> "> <?php tribe_get_template_part('pro/widgets/mini-calendar/single-day'); ?> </td> <?php } ?> </tr> </tbody> <?php do_action('tribe_events_mini_cal_after_the_grid'); ?> </table> </div> <!-- .tribe-mini-calendar-grid-wrapper -->
} ?> </a> </div> </div> <?php } ?> <div class="fusion-tribe-secondary-info"> <!-- Event Meta --> <?php do_action('tribe_events_before_the_meta'); ?> <?php tribe_get_template_part('list/meta'); ?> <?php do_action('tribe_events_after_the_meta'); ?> <!-- Event Content --> <?php do_action('tribe_events_before_the_content'); ?> <div class="tribe-events-list-event-description tribe-events-content description entry-summary"> <?php the_excerpt(); ?> <a href="<?php echo esc_url(tribe_get_event_link());
* The wrapper template for a list of events. This includes the Past Events and Upcoming Events views * as well as those same views filtered to a specific category. * * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list.php * * @package TribeEventsCalendar * */ if (!defined('ABSPATH')) { die('-1'); } ?> <?php do_action('tribe_events_before_template'); ?> <!-- Tribe Bar --> <?php tribe_get_template_part('modules/bar'); ?> <!-- Main Events Content --> <?php tribe_get_template_part('list/content'); ?> <div class="tribe-clear"></div> <?php do_action('tribe_events_after_template');
<div class="tribe-mini-calendar-list-wrapper"> <div class="tribe-events-loop hfeed vcalendar"> <?php while (have_posts()) { the_post(); ?> <?php do_action('tribe_events_mini_cal_list_inside_before_loop'); ?> <!-- Event --> <div class="<?php tribe_events_event_classes(); ?> "> <?php tribe_get_template_part('pro/widgets/modules/single-event'); ?> </div><!-- .hentry .vevent --> <?php do_action('tribe_events_mini_cal_list_inside_after_loop'); ?> <?php } ?> </div><!-- .tribe-events-loop --> </div> <!-- .tribe-mini-calendar-list-wrapper -->
die('-1'); } ?> <?php $event = tribe_events_week_get_event(); ?> <div id="tribe-events-event-<?php echo $event->ID; ?> " <?php tribe_events_the_header_attributes('week-hourly'); ?> class="<?php tribe_events_event_classes(); ?> "> <div class="hentry vevent"> <h3 class="entry-title summary"><a href="<?php tribe_event_link($event); ?> " class="url" rel="bookmark"><?php echo $event->post_title; ?> </a></h3> </div> <?php tribe_get_template_part('pro/week/single-event', 'tooltip'); ?> </div>
<?php do_action('tribe_events_after_loop'); ?> <?php } ?> <!-- List Footer --> <?php do_action('tribe_events_before_footer'); ?> <div id="tribe-events-footer"> <!-- Footer Navigation --> <?php do_action('tribe_events_before_footer_nav'); ?> <?php tribe_get_template_part('day/nav'); ?> <?php do_action('tribe_events_after_footer_nav'); ?> </div> <!-- #tribe-events-footer --> <?php do_action('tribe_events_after_footer'); ?> </div><!-- #tribe-events-content -->
/** * Photo View Template * The wrapper template for photo view. * * Override this template in your own theme by creating a file at [your-theme]/tribe-events/photo.php * * @package TribeEventsCalendar * */ if (!defined('ABSPATH')) { die('-1'); } ?> <?php do_action('tribe_events_before_template'); ?> <!-- Tribe Bar --> <?php tribe_get_template_part('modules/bar'); ?> <!-- Main Events Content --> <?php tribe_get_template_part('pro/photo/content'); ?> <?php do_action('tribe_events_after_template');
do_action('tribe_events_single_event_after_the_content'); ?> <!-- Event meta --> <?php do_action('tribe_events_single_event_before_the_meta'); ?> <?php /** * The tribe_events_single_event_meta() function has been deprecated and has been * left in place only to help customers with existing meta factory customizations * to transition: if you are one of those users, please review the new meta templates * and make the switch! */ if (!apply_filters('tribe_events_single_event_meta_legacy_mode', false)) { tribe_get_template_part('modules/meta'); } else { echo tribe_events_single_event_meta(); } ?> <?php do_action('tribe_events_single_event_after_the_meta'); ?> </div> <!-- #post-x --> <?php if (get_post_type() == TribeEvents::POSTTYPE && tribe_get_option('showComments', false)) { comments_template(); } ?> <?php }
/** * * returns the full markup for the AJAX Calendar * * @static * * @param array $args * -----> eventDate: date What month-year to print * count: int # of events in the list (doesn't affect the calendar). * tax_query: array For the events list (doesn't affect the calendar). * Same format as WP_Query tax_queries. See sample below. * * * tax_query sample: * * array( 'relation' => 'AND', * array( 'taxonomy' => 'tribe_events_cat', * 'field' => 'slug', * 'terms' => array( 'featured' ), * array( 'taxonomy' => 'post_tag', * 'field' => 'id', * 'terms' => array( 103, 115, 206 ), * 'operator' => 'NOT IN' ) ) ); * * */ public function do_calendar($args = array()) { $this->args = $args; if (!isset($this->args['eventDate'])) { $this->args['eventDate'] = $this->get_month(); } // don't show the list if they set it the widget option to show 0 events in the list if ($this->args['count'] == 0) { $this->show_list = false; } // enqueue the widget js self::styles_and_scripts(); // widget setting for count is not 0 if (!$this->show_list) { add_filter('tribe_events_template_widgets/mini-calendar/list.php', '__return_false'); } tribe_get_template_part('pro/widgets/mini-calendar-widget'); }
/** * The main widget output function (called by the class's widget() function). * * @param array $args * @param array $instance * @param string $template_name The template name. * @param string $subfolder The subfolder where the template can be found. * @param string $namespace The namespace for the widget template stuff. * @param string $pluginPath The pluginpath so we can locate the template stuff. */ function widget_output($args, $instance, $template_name = 'list-widget', $subfolder = 'widgets', $namespace = '/', $pluginPath = '') { global $wp_query, $tribe_ecp, $post; extract($args, EXTR_SKIP); // The view expects all these $instance variables, which may not be set without pro $instance = wp_parse_args($instance, array('limit' => 5, 'title' => '')); extract($instance, EXTR_SKIP); // 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]); } } // extracting $instance provides $title, $limit $title = apply_filters('widget_title', $title); if (!isset($category) || $category === '-1') { $category = 0; } if (tribe_get_option('viewOption') == 'upcoming') { $event_url = tribe_get_listview_link($category); } else { $event_url = tribe_get_gridview_link($category); } if (function_exists('tribe_get_events')) { $args = array('eventDisplay' => 'upcoming', 'posts_per_page' => $limit); if (!empty($category)) { $args['tax_query'] = array(array('taxonomy' => TribeEvents::TAXONOMY, 'terms' => $category, 'field' => 'ID', 'include_children' => false)); } $posts = tribe_get_events($args); } // if no posts, and the don't show if no posts checked, let's bail if (!$posts && $no_upcoming_events) { return; } /* Before widget (defined by themes). */ echo $before_widget; /* Title of widget (before and after defined by themes). */ echo $title ? $before_title . $title . $after_title : ''; if ($posts) { /* Display list of events. */ echo '<ol class="hfeed vcalendar">'; foreach ($posts as $post) { setup_postdata($post); tribe_get_template_part('widgets/list-widget'); } echo "</ol><!-- .hfeed -->"; /* Display link to all events */ echo '<p class="tribe-events-widget-link"><a href="' . $event_url . '" rel="bookmark">' . __('View All Events', 'tribe-events-calendar') . '</a></p>'; } else { echo '<p>' . __('There are no upcoming events at this time.', 'tribe-events-calendar') . '</p>'; } /* After widget (defined by themes). */ echo $after_widget; wp_reset_query(); // reinstate the tribe bar params if (!empty($hold_tribe_bar_args)) { foreach ($hold_tribe_bar_args as $key => $value) { $_REQUEST[$key] = $value; } } }
<?php do_action('tribe_events_before_footer'); ?> <div id="tribe-events-footer"> <!-- Footer Navigation --> <?php do_action('tribe_events_before_footer_nav'); ?> <?php tribe_get_template_part('month/nav'); ?> <?php do_action('tribe_events_after_footer_nav'); ?> </div> <!-- #tribe-events-footer --> <?php do_action('tribe_events_after_footer'); ?> <?php tribe_get_template_part('month/mobile'); ?> <?php tribe_get_template_part('month/tooltip'); ?> </div><!-- #tribe-events-content -->
<div class="tribe-grid-content-wrap"> <?php while (tribe_events_week_have_days()) { tribe_events_week_the_day(); ?> <div title="<?php tribe_events_week_get_the_date(); ?> " class="column <?php tribe_events_week_column_classes(); ?> "> <?php foreach (tribe_events_week_get_hourly() as $event) { if (tribe_events_week_setup_event($event)) { ?> <?php tribe_get_template_part('pro/week/single-event', 'hourly'); ?> <?php } } ?> </div><!-- hourly column --> <?php } ?> </div><!-- .tribe-grid-content-wrap --> </div><!-- .tribe-grid-body --> </div><!-- .tribe-week-grid-wrapper -->
?> <?php do_action('tribe_events_after_loop'); ?> <?php } ?> <!-- List Footer --> <?php do_action('tribe_events_before_footer'); ?> <div id="tribe-events-footer"> <!-- Footer Navigation --> <?php do_action('tribe_events_before_footer_nav'); ?> <?php tribe_get_template_part('photo/nav', 'footer'); ?> <?php do_action('tribe_events_after_footer_nav'); ?> </div><!-- #tribe-events-footer --> <?php do_action('tribe_events_after_footer'); ?> </div><!-- #tribe-events-content -->