/** * Theme basic config. * * @see https://gist.github.com/jo-snips/2415009 */ function dt_the_events_calendar_template_config() { // detect calendar pages if (tribe_is_month() && !is_tax() || tribe_is_month() && is_tax() || (tribe_is_past() || tribe_is_upcoming() && !is_tax()) || (tribe_is_past() || tribe_is_upcoming() && is_tax()) || tribe_is_day() && !is_tax() || tribe_is_day() && is_tax() || tribe_is_event() && is_single() || tribe_is_venue() || function_exists('tribe_is_week') && tribe_is_week() || function_exists('tribe_is_photo') && tribe_is_photo() || function_exists('tribe_is_map') && tribe_is_map() || get_post_type() == 'tribe_organizer' && is_single()) { // remove theme title controller remove_action('presscore_before_main_container', 'presscore_page_title_controller', 16); } }
/** * Get a link to the previous events * * @return string */ function tribe_get_previous_events_link() { $link = ''; if (tribe_is_upcoming() && (!empty($_REQUEST['tribe_paged']) && $_REQUEST['tribe_paged'] > 1)) { // if we're more than one page into the future, the previous link will be in the future as well $link = tribe_get_upcoming_link(); } else { $link = tribe_get_past_link(); } return apply_filters('tribe_get_previous_events_link', $link); }
/** * Get the title for list view * @param $title * @param null $sep * * @return string */ protected function get_title($original_title, $sep = null) { $new_title = parent::get_title($original_title, $sep); if (tribe_is_upcoming() && has_filter('tribe_upcoming_events_title')) { _deprecated_function("The 'tribe_upcoming_events_title' filter", '3.8', " the 'tribe_get_events_title' filter"); $new_title = apply_filters('tribe_upcoming_events_title', $new_title, $sep); } elseif (has_filter('tribe_past_events_title')) { _deprecated_function("The 'tribe_past_events_title' filter", '3.8', " the 'tribe_get_events_title' filter"); $new_title = apply_filters('tribe_past_events_title', $new_title, $sep); } return $new_title; }
function wpv_upcoming_events_title($title) { $upcoming = wpv_get_option('tribe-events-upcoming-title'); $past = wpv_get_option('tribe-events-past-title'); $month = wpv_get_option('tribe-events-month-title'); if (!empty($upcoming) && (tribe_is_upcoming() || function_exists('tribe_is_map') && tribe_is_map() || function_exists('tribe_is_photo') && tribe_is_photo())) { return $upcoming; } elseif (!empty($past) && tribe_is_past()) { return $past; } elseif (!empty($month) && tribe_is_month()) { return sprintf($month, date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date()))); } return $title; }
function filter_events_title($title) { if (tribe_is_month() && !is_tax()) { // Month View Page $title = 'Events - Month view page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_month() && is_tax()) { // Month View Category Page $title = 'Events - Month view category page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_upcoming() && !is_tax()) { // List View Page: Upcoming Events $title = 'Events - Upcoming events page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_upcoming() && is_tax()) { // List View Category Page: Upcoming Events $title = 'Events - Upcoming events page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_past() && !is_tax()) { // List View Page: Past Events $title = 'Events - Past events page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_past() && is_tax()) { // List View Category Page: Past Events $title = 'Events - Category: Past events page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_week() && !is_tax()) { // Week View Page $title = 'Events - Week view page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_week() && is_tax()) { // Week View Category Page $title = 'Events - Week view category page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_day() && !is_tax()) { // Day View Page $title = 'Events - Day view page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_day() && is_tax()) { // Day View Category Page $title = 'Events - Day view category page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_map() && !is_tax()) { // Map View Page $title = 'Events - Map view page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_map() && is_tax()) { // Map View Category Page $title = 'Events - Map view category page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_photo() && !is_tax()) { // Photo View Page $title = 'Events - Photo view page | Czech and Slovak Club Tauranga'; } elseif (tribe_is_photo() && is_tax()) { // Photo View Category Page $title = 'Events - Photo view category page | Czech and Slovak Club Tauranga'; } return $title; }
/** * Prints out data attributes used in the template header tags * * @param string|null $current_view * @return void * @since 3.0 **/ function tribe_events_the_header_attributes($current_view = null) { $attrs = array(); $current_view = !empty($current_view) ? $current_view : basename(tribe_get_current_template()); $attrs['data-title'] = wp_title('»', false); switch ($current_view) { case 'month.php': $attrs['data-view'] = 'month'; $attrs['data-date'] = date('Y-m', strtotime(tribe_get_month_view_date())); $attrs['data-baseurl'] = tribe_get_gridview_link(false); break; case 'list.php': $attrs['data-view'] = 'list'; if (tribe_is_upcoming()) { $attrs['data-baseurl'] = tribe_get_listview_link(false); } elseif (tribe_is_past()) { $attrs['data-view'] = 'past'; $attrs['data-baseurl'] = tribe_get_listview_past_link(false); } break; } $attrs = apply_filters('tribe_events_header_attributes', $attrs, $current_view); foreach ($attrs as $attr => $value) { echo " {$attr}=" . '"' . $value . '"'; } }
function is_events_archive() { if (class_exists('Tribe__Events__Main')) { return tribe_is_month() || tribe_is_day() || tribe_is_past() || tribe_is_upcoming() || class_exists('Tribe__Events__Pro__Main') && (tribe_is_week() || tribe_is_photo() || tribe_is_map()) ? true : false; } else { return false; } }
/** * @deprecated */ function sp_is_upcoming() { _deprecated_function(__FUNCTION__, '2.0', 'tribe_is_upcoming()'); return tribe_is_upcoming(); }
?> </span></a> <?php } elseif (tribe_is_past() && get_next_posts_link()) { ?> <?php next_posts_link('<span>' . __('« Previous Events', 'tribe-events-calendar') . '</span>'); ?> <?php } ?> </div> <div class="tribe-events-nav-next"><?php // Display Next Page Navigation if (tribe_is_upcoming() && get_next_posts_link()) { ?> <?php next_posts_link('<span>' . __('Next Events »', 'tribe-events-calendar') . '</span>'); ?> <?php } elseif (tribe_is_past() && get_previous_posts_link()) { ?> <?php previous_posts_link('<span>' . __('Next Events »', 'tribe-events-calendar') . '</span>'); // a little confusing but in 'past view' to see newer events you want the previous page ?> <?php } elseif (tribe_is_past() && !get_previous_posts_link()) { ?> <a href='<?php
/** * Determine which pages should NOT display the sidebar */ function display_sidebar() { static $display; isset($display) || ($display = !in_array(true, [is_404(), is_front_page(), is_page_template('template-custom.php'), is_page('about'), is_page('contact'), is_page('menu'), is_page('gallery'), is_page('thank-you'), is_single(), is_home(), tribe_is_month() && !is_tax(), tribe_is_past() || tribe_is_upcoming() && !is_tax(), tribe_is_past() || tribe_is_upcoming() && is_tax(), tribe_is_day() && !is_tax(), tribe_is_day() && is_tax(), tribe_is_event() && is_single(), tribe_is_month() && is_tax(), tribe_is_event() && is_single()])); return apply_filters('sage/display_sidebar', $display); }
/** * Sets an appropriate no results found message. This may be overridden in child classes. */ protected function nothing_found_notice() { list($search_term, $tax_term, $geographic_term) = $this->get_search_terms(); if (!empty($search_term)) { TribeEvents::setNotice('event-search-no-results', sprintf(__('There were no results found for <strong>"%s"</strong>.', 'tribe-events-calendar'), esc_html($search_term))); } elseif (!empty($geographic_term)) { TribeEvents::setNotice('event-search-no-results', sprintf(__('No results were found for events in or near <strong>"%s"</strong>.', 'tribe-events-calendar'), esc_html($geographic_term))); } elseif (!empty($tax_term) && tribe_is_upcoming() && date('Y-m-d') === date('Y-m-d', strtotime($tribe->date))) { TribeEvents::setNotice('events-not-found', sprintf(__('No upcoming events listed under %s. Check out upcoming events for this category or view the full calendar.', 'tribe-events-calendar'), $tax_term)); } elseif (!empty($tax_term) && tribe_is_upcoming()) { TribeEvents::setNotice('events-not-found', sprintf(__('No matching events listed under %s. Please try viewing the full calendar for a complete list of events.', 'tribe-events-calendar'), $tax_term)); } elseif (!empty($tax_term) && tribe_is_past()) { TribeEvents::setNotice('events-past-not-found', __('No previous events ', 'tribe-events-calendar')); } elseif (!empty($tax_term)) { TribeEvents::setNotice('events-not-found', sprintf(__('No matching events listed under %s. Please try viewing the full calendar for a complete list of events.', 'tribe-events-calendar'), $tax_term)); } else { TribeEvents::setNotice('event-search-no-results', __('There were no results found.', 'tribe-events-calendar')); } }
public function setReccuringEventDates($post) { if (function_exists('tribe_is_recurring_event') && is_singular(self::POSTTYPE) && tribe_is_recurring_event() && !tribe_is_showing_all() && !tribe_is_upcoming() && !tribe_is_past() && !tribe_is_month() && !tribe_is_by_date()) { $startTime = get_post_meta($post->ID, '_EventStartDate', true); $startTime = TribeDateUtils::timeOnly($startTime); $post->EventStartDate = TribeDateUtils::addTimeToDate($this->date, $startTime); $post->EventEndDate = date(TribeDateUtils::DBDATETIMEFORMAT, strtotime($post->EventStartDate) + get_post_meta($post->ID, '_EventDuration', true)); } }
function is_events_archive() { if (class_exists('TribeEvents')) { if (tribe_is_month() || tribe_is_day() || tribe_is_past() || tribe_is_upcoming()) { return true; } else { return false; } } else { return false; } }
/** * Sets an appropriate no results found message. This may be overridden in child classes. */ protected function nothing_found_notice() { $events_label_plural = strtolower(tribe_get_event_label_plural()); list($search_term, $tax_term, $geographic_term) = $this->get_search_terms(); $tribe = Tribe__Events__Main::instance(); if (!empty($search_term)) { Tribe__Events__Main::setNotice('event-search-no-results', sprintf(__('There were no results found for <strong>"%s"</strong>.', 'the-events-calendar'), esc_html($search_term))); } elseif (!empty($geographic_term)) { Tribe__Events__Main::setNotice('event-search-no-results', sprintf(__('No results were found for %1$s in or near <strong>"%2$s"</strong>.', 'the-events-calendar'), $events_label_plural, esc_html($geographic_term))); } elseif (!empty($tax_term) && tribe_is_upcoming() && date('Y-m-d') === date('Y-m-d', strtotime($tribe->date))) { Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No upcoming %1$s listed under %2$s. Check out upcoming %3$s for this category or view the full calendar.', 'the-events-calendar'), $events_label_plural, $tax_term, $events_label_plural)); } elseif (!empty($tax_term) && tribe_is_upcoming()) { Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No matching %1$s listed under %2$s. Please try viewing the full calendar for a complete list of %3$s.', 'the-events-calendar'), $events_label_plural, $tax_term, $events_label_plural)); } elseif (!empty($tax_term) && tribe_is_past()) { Tribe__Events__Main::setNotice('events-past-not-found', sprintf(__('No previous %s ', 'the-events-calendar'), $events_label_plural)); } elseif (!empty($tax_term)) { Tribe__Events__Main::setNotice('events-not-found', sprintf(__('No matching %1$s listed under %2$s. Please try viewing the full calendar for a complete list of %3$s.', 'the-events-calendar'), $events_label_plural, $tax_term, $events_label_plural)); } else { Tribe__Events__Main::setNotice('event-search-no-results', __('There were no results found.', 'the-events-calendar')); } }
public static function get_current_page_template() { $template = ''; if (is_tax(TribeEvents::TAXONOMY)) { if (tribe_is_upcoming() || tribe_is_past()) { $template = TribeEventsTemplates::getTemplateHierarchy('list'); } else { $template = TribeEventsTemplates::getTemplateHierarchy('gridview'); } } // single event if (is_single() && !tribe_is_showing_all()) { $template = TribeEventsTemplates::getTemplateHierarchy('single'); } elseif (tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || is_single() && tribe_is_showing_all()) { $template = TribeEventsTemplates::getTemplateHierarchy('list'); } else { $template = TribeEventsTemplates::getTemplateHierarchy('gridview'); } return apply_filters('tribe_current_events_page_template', $template); }
function avia_events_breadcrumb($trail) { global $avia_config; if (isset($avia_config['currently_viewing']) && $avia_config['currently_viewing'] == 'events' || tribe_is_month() || get_post_type() === TribeEvents::POSTTYPE || is_tax(TribeEvents::TAXONOMY)) { $events = __('Events', 'avia_framework'); $events_link = '<a href="' . tribe_get_events_link() . '">' . $events . '</a>'; if (is_tax(TribeEvents::TAXONOMY)) { $last = array_pop($trail); $trail[] = $events_link; $trail[] = $last; } else { if (tribe_is_month() || tribe_is_upcoming() && !is_singular()) { $trail[] = $events_link; } else { if (tribe_is_event()) { $last = array_pop($trail); $trail[] = $events_link; $trail[] = $last; } } } if (isset($avia_config['events_trail'])) { $trail = $avia_config['events_trail']; } } return $trail; }
<?php /* Template Name: Full Width Page */ ?> <?php get_header(); the_post(); ?> <?php if (tribe_is_past() || tribe_is_upcoming() && !is_tax()) { ?> <div class="container-fluid"> <?php echo do_shortcode('[new_royalslider id="1"]'); ?> </div> <!-- /.container --> <hr class="m-y-2"> <?php } ?> <div class="container"> <div class="row">
function fitclub_is_tribe_page() { wp_reset_postdata(); //reset custom query if (class_exists('TRIBE__EVENTS__MAIN')) { if (tribe_is_month() && !is_tax()) { // Month View Page return true; } elseif (tribe_is_month() && is_tax()) { // Month View Category Page return true; } elseif (tribe_is_past() || tribe_is_upcoming() && !is_tax()) { // List View Page return true; } elseif (tribe_is_past() || tribe_is_upcoming() && is_tax()) { // List View Category Page return true; } elseif (tribe_is_day() && !is_tax()) { // Day View Page return true; } elseif (tribe_is_day() && is_tax()) { // Day View Category Page return true; } elseif (tribe_is_event() && is_single()) { // Single Events return true; } } return false; }
/** * Determine classes to apply to right side nav links * * @param $side */ function tribe_right_navigation_classes() { $classes = array(); $tribe_paged = !empty($_REQUEST['tribe_paged']) ? $_REQUEST['tribe_paged'] : 1; $classes['direction'] = tribe_is_upcoming() ? 'tribe-events-nav-next' : 'tribe-events-nav-previous'; $classes['side'] = 'tribe-events-nav-right'; if (tribe_is_past() && $tribe_paged > 1) { $classes['past'] = 'tribe-events-past'; } $classes = apply_filters('tribe_right_navigation_classes', $classes); return implode(' ', $classes); }
/** * Add a menu item class to the event * * @param array $items * @param array $args * * @return array */ public function add_current_menu_item_class_to_events($items, $args) { foreach ($items as $item) { if ($item->url == $this->getLink()) { if (is_singular(self::POSTTYPE) || is_singular(self::VENUE_POST_TYPE) || is_tax(self::TAXONOMY) || (tribe_is_upcoming() || tribe_is_past() || tribe_is_month()) && isset($wp_query->query_vars['eventDisplay'])) { $item->classes[] = 'current-menu-item current_page_item'; } break; } } return $items; }
/** * Set up the date search in the tribe events bar. * * @param array $filters The current filters in the bar array. * @return array The modified filters array. */ public function setup_date_search_in_bar($filters) { $value = apply_filters('tribe-events-bar-date-search-default-value', ''); if (!empty($_REQUEST['tribe-bar-date'])) { $value = $_REQUEST['tribe-bar-date']; } $caption = __('Date', 'tribe-events-calendar'); if (tribe_is_month()) { $caption = __('Events In', 'tribe-events-calendar'); } elseif (tribe_is_upcoming() || tribe_is_past()) { $caption = __('Events From', 'tribe-events-calendar'); } $caption = apply_filters('tribe_bar_datepicker_caption', $caption); $filters['tribe-bar-date'] = array('name' => 'tribe-bar-date', 'caption' => $caption, 'html' => '<input type="text" name="tribe-bar-date" style="position: relative;" id="tribe-bar-date" value="' . esc_attr($value) . '" placeholder="' . __('Date', 'tribe-events-calendar') . '"> <input type="hidden" name="tribe-bar-date-day" id="tribe-bar-date-day" class="tribe-no-param" value="">'); return $filters; }
?> <div class="col-xs-6 text-right"> <a href="<?php echo tribe_get_upcoming_link(); ?> " rel="next" class="btn-text"><?php _e('Next <span class="hide-below-480">Classes</span> <span class="icon-arrow-right"></span>', 'tribe-events-calendar'); ?> </a> <?php } ?> </div> <?php } elseif (tribe_is_upcoming()) { ?> <div class="col-xs-6 text-right"> <?php if (get_next_posts_link()) { ?> <a href="<?php echo tribe_get_upcoming_link(); ?> " rel="next" class="btn-text"><?php _e('Next <span class="hide-below-480">Classes</span> <span class="icon-arrow-right"></span>', 'tribe-events-calendar'); ?> </a> <?php }
/** * Set up the notices for this template * * @return void * @since 3.0 **/ public function set_notices() { global $wp_query; $tribe = TribeEvents::instance(); $geographic_term = ''; $search_term = ''; $tax_term = ''; // By default we only display notices if no events could be found if (have_posts()) { return; } // Do we have a keyword or place name search? if (!empty($wp_query->query_vars['s'])) { $search_term = $wp_query->query_vars['s']; } elseif (!empty($_REQUEST['tribe-bar-search'])) { $search_term = $_REQUEST['tribe-bar-search']; } elseif (!empty($_REQUEST['tribe-bar-geoloc'])) { $geographic_term = $_REQUEST['tribe-bar-geoloc']; } if (is_tax($tribe->get_event_taxonomy())) { $tax_term = get_term_by('slug', get_query_var('term'), $tribe->get_event_taxonomy()); $tax_term = esc_html($tax_term->name); } // Set an appropriate notice if (!empty($search_term)) { TribeEvents::setNotice('event-search-no-results', sprintf(__('There were no results found for <strong>"%s"</strong>.', 'tribe-events-calendar'), esc_html($search_term))); } elseif (!empty($geographic_term)) { TribeEvents::setNotice('event-search-no-results', sprintf(__('No results were found for events in or near <strong>"%s"</strong>.', 'tribe-events-calendar'), esc_html($geographic_term))); } elseif (!empty($tax_term) && tribe_is_upcoming() && date('Y-m-d') === date('Y-m-d', strtotime($tribe->date))) { TribeEvents::setNotice('events-not-found', sprintf(__('No upcoming events listed under %s. Check out upcoming events for this category or view the full calendar.', 'tribe-events-calendar'), $tax_term)); } elseif (!empty($tax_term) && tribe_is_upcoming()) { TribeEvents::setNotice('events-not-found', sprintf(__('No matching events listed under %s. Check out upcoming events for this category or view the full calendar.', 'tribe-events-calendar'), $tax_term)); } elseif (!empty($tax_term) && tribe_is_past()) { TribeEvents::setNotice('events-past-not-found', __('No previous events ', 'tribe-events-calendar')); } else { TribeEvents::setNotice('event-search-no-results', __('There were no results found.', 'tribe-events-calendar')); } }
function tribe_genesis_event_archive_full_content() { if (class_exists('Tribe__Events__Main') && class_exists('Tribe__Events__Pro__Main')) { if (tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || tribe_is_map() || tribe_is_photo() || tribe_is_week()) { return 'full'; } } elseif (class_exists('Tribe__Events__Main') && !class_exists('Tribe__Events__Pro__Main')) { if (tribe_is_month() || tribe_is_upcoming() || tribe_is_past() || tribe_is_day()) { return 'full'; } } }
/** * Prints out data attributes used in the template header tags * * @category Events * @param string|null $current_view * * @return void * @todo move to template classes **/ function tribe_events_the_header_attributes($current_view = null) { $attrs = array(); $current_view = !empty($current_view) ? $current_view : basename(tribe_get_current_template()); $attrs['data-title'] = wp_title('|', false, 'right'); switch ($current_view) { case 'month.php': $attrs['data-view'] = 'month'; $attrs['data-date'] = date('Y-m', strtotime(tribe_get_month_view_date())); $attrs['data-baseurl'] = tribe_get_gridview_link(false); break; case 'day.php': $attrs['data-startofweek'] = get_option('start_of_week'); break; case 'list.php': $attrs['data-startofweek'] = get_option('start_of_week'); $attrs['data-view'] = 'list'; if (tribe_is_upcoming()) { $attrs['data-baseurl'] = tribe_get_listview_link(false); } elseif (tribe_is_past()) { $attrs['data-view'] = 'past'; $attrs['data-baseurl'] = tribe_get_listview_past_link(false); } break; } if (has_filter('tribe_events_mobile_breakpoint')) { $attrs['data-mobilebreak'] = tribe_get_mobile_breakpoint(); } $attrs = apply_filters('tribe_events_header_attributes', $attrs, $current_view); foreach ($attrs as $attr => $value) { echo " {$attr}=" . '"' . esc_attr($value) . '"'; } }
function remove_end_time($formatting_details) { if (tribe_is_past() || tribe_is_upcoming() && !is_tax()) { $formatting_details['show_end_time'] = 0; } return $formatting_details; }
/** * Set up the notices for this template * * @return void * @since 3.0 **/ public function set_notices() { global $wp_query; // Look for a search query if (!empty($wp_query->query_vars['s'])) { $search_term = $wp_query->query_vars['s']; } else { if (!empty($_POST['tribe-bar-search'])) { $search_term = $_POST['tribe-bar-search']; } } // Search term based notices if (!empty($search_term) && !have_posts()) { TribeEvents::setNotice('event-search-no-results', sprintf(__('There were no results found for <strong>"%s"</strong>.', 'tribe-events-calendar'), esc_html($search_term))); } else { if (empty($search_term) && empty($wp_query->query_vars['s']) && !have_posts()) { // Messages if currently no events, and no search term $tribe_ecp = TribeEvents::instance(); $is_cat_message = ''; if (is_tax($tribe_ecp->get_event_taxonomy())) { $cat = get_term_by('slug', get_query_var('term'), $tribe_ecp->get_event_taxonomy()); if (tribe_is_upcoming()) { $is_cat_message = sprintf(__('listed under %s. Check out past events for this category or view the full calendar.', 'tribe-events-calendar'), esc_html($cat->name)); } else { if (tribe_is_past()) { $is_cat_message = sprintf(__('listed under %s. Check out upcoming events for this category or view the full calendar.', 'tribe-events-calendar'), esc_html($cat->name)); } } } if (tribe_is_day()) { TribeEvents::setNotice('events-not-found', sprintf(__('No events scheduled for <strong>%s</strong>. Please try another day.', 'tribe-events-calendar'), date_i18n('F d, Y', strtotime(get_query_var('eventDate'))))); } elseif (tribe_is_upcoming()) { $date = date('Y-m-d', strtotime($tribe_ecp->date)); if ($date == date('Y-m-d')) { TribeEvents::setNotice('events-not-found', __('No upcoming events ', 'tribe-events-calendar') . $is_cat_message); } else { TribeEvents::setNotice('events-not-found', __('No matching events ', 'tribe-events-calendar') . $is_cat_message); } } elseif (tribe_is_past()) { TribeEvents::setNotice('events-past-not-found', __('No previous events ', 'tribe-events-calendar') . $is_cat_message); } } } }
/** * Determines if we are in list view. * * @return bool * @since 2.1 */ function tribe_is_list_view() { if (tribe_is_event_query() && (tribe_is_upcoming() || tribe_is_past() || tribe_is_day() || is_single() && tribe_is_showing_all())) { $return = true; } else { $return = false; } return apply_filters('tribe_is_list_view', $return); }
/** * Echo the setting for hiding subsequent occurrences of recurring events to frontend. * * @return void */ public function add_recurring_occurance_setting_to_list() { if (tribe_get_option('userToggleSubsequentRecurrences', true) && !tribe_is_showing_all() && (tribe_is_upcoming() || tribe_is_past() || tribe_is_map() || tribe_is_photo()) || apply_filters('tribe_events_display_user_toggle_subsequent_recurrences', false)) { echo tribe_recurring_instances_toggle(); } }
<section id="secondary-navigation"> <div class="big-container full-width"> <div class="container"> <ul class="clearfix"> <?php if (is_page('news') || tribe_is_event() || tribe_is_month() && !is_tax() || (tribe_is_past() || tribe_is_upcoming() && !is_tax()) || tribe_is_day() && !is_tax() || tribe_is_event_category() || tribe_is_in_main_loop() || tribe_is_view() || 'tribe_events' == get_post_type() || is_singular('tribe_events')) { ?> <li class="page_item page-item-37"> <a></a> </li> <?php } else { ?> <?php wp_list_pages(array('title_li' => '', 'include' => get_post_top_ancestor_id())); ?> <?php wp_list_pages(array('title_li' => '', 'depth' => 1, 'child_of' => get_post_top_ancestor_id())); ?> <?php } ?> </ul> </div> </div> </section>