/**
 * 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);
    }
}
Example #2
0
 /**
  * Get a link to the next events
  *
  * @return string
  */
 function tribe_get_next_events_link()
 {
     $link = '';
     if (tribe_is_past() && (!empty($_REQUEST['tribe_paged']) && $_REQUEST['tribe_paged'] > 1)) {
         // if we're more than one page into the past, the next link will be in the past as well
         $link = tribe_get_past_link();
     } else {
         $link = tribe_get_upcoming_link();
     }
     return apply_filters('tribe_get_next_events_link', $link);
 }
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;
}
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;
    }
}
Example #6
0
 /**
  * @deprecated
  */
 function sp_is_past()
 {
     _deprecated_function(__FUNCTION__, '2.0', 'tribe_is_past()');
     return tribe_is_past();
 }
Example #7
0
/**
 * Breadcrumbs Functions
 *
 * @since 1.0
 * @param array $args
 * @return string
 */
function miss_get_breadcrumbs($args = '')
{
    global $wp_query;
    $breadcrumb_delimiter = miss_get_setting('breadcrumb_delimiter');
    $delimiter = !empty($breadcrumb_delimiter) ? html_entity_decode(htmlentities($breadcrumb_delimiter)) : '&raquo';
    /* Set up the default arguments for the breadcrumb. */
    $defaults = array('prefix' => '', 'suffix' => '', 'title' => '', 'home' => __('Home', MISS_TEXTDOMAIN), 'sep' => $delimiter, 'front_page' => false, 'bold' => true, 'show_blog' => true, 'singular_post_taxonomy' => null, 'echo' => false);
    $args = apply_filters('miss_breadcrumbs_args', $args);
    $args = wp_parse_args($args, $defaults);
    if (is_front_page() && !$args['front_page']) {
        return apply_filters('miss_get_breadcrumbs', false);
    }
    /* Format the title. */
    $html = !empty($args['title']) ? '<span class="breadcrumbs-title">' . $args['title'] . '</span>' : '';
    /* Format the separator. */
    $separator = !empty($args['sep']) ? ' <span class="delimiter">' . $args['sep'] . '</span> ' : ' <span class="delimiter">/</span> ';
    $show_on_front = get_option('show_on_front');
    $home = '<a href="' . home_url('/') . '" rel="home" class="home_breadcrumb">' . $args['home'] . '</a>';
    if ('page' == $show_on_front && $args['show_blog']) {
        $bloglink = $home . $separator . '<a href="' . get_permalink(get_option('page_for_posts')) . '">' . get_the_title(get_option('page_for_posts')) . '</a>';
    } else {
        $bloglink = $home;
    }
    if (is_front_page()) {
        $html .= miss_breadcrumbs_bold($home, $args['bold']);
    } elseif (is_home()) {
        $html .= $home . $separator . miss_breadcrumbs_bold(get_the_title(get_option('page_for_posts')), $args['bold']);
    } elseif (function_exists('is_woocommerce') && is_woocommerce()) {
        $html .= $home . $separator . __("Store", MISS_TEXTDOMAIN);
        /* If viewing a portfolio post. */
    } elseif (is_singular('portfolio')) {
        $html .= $home . $separator;
        $gallery_id = miss_get_setting('portfolio_page');
        if (!empty($gallery_id)) {
            $html .= '<a href="' . get_permalink($gallery_id) . '" title="' . esc_attr(get_the_title($gallery_id)) . '">' . get_the_title($gallery_id) . '</a>' . $separator;
        }
        $html .= miss_breadcrumbs_bold(get_the_title(), $args['bold']);
        /* Added to refect miss_blog_page() */
        /* If viewing a singular post. */
    } elseif (is_singular('miss_gallery')) {
        $html .= $home . $separator;
        $gallery_id = miss_get_setting('gallery_page');
        if (!empty($gallery_id)) {
            $html .= '<a href="' . get_permalink($gallery_id) . '" title="' . esc_attr(get_the_title($gallery_id)) . '">' . get_the_title($gallery_id) . '</a>' . $separator;
        }
        $html .= miss_breadcrumbs_bold(get_the_title(), $args['bold']);
    } elseif (is_singular('news')) {
        $html .= $home . $separator;
        $gallery_id = miss_get_setting('news_page');
        if (!empty($gallery_id)) {
            $html .= '<a href="' . get_permalink($gallery_id) . '" title="' . esc_attr(get_the_title($gallery_id)) . '">' . get_the_title($gallery_id) . '</a>' . $separator;
        }
        $html .= miss_breadcrumbs_bold(get_the_title(), $args['bold']);
    } elseif (is_archive() && get_post_type() == 'news') {
        $html .= $home . $separator . __('News', MISS_TEXTDOMAIN);
    } elseif (get_post_type() == 'forum' || get_post_type() == 'topic' || get_post_type() == 'reply') {
        $html .= bbp_get_breadcrumb(array('before' => '', 'after' => '', 'sep' => $separator));
    } elseif (is_singular('benefits')) {
        $html .= $home . $separator;
        $gallery_id = miss_get_setting('benefits_page');
        if (!empty($gallery_id)) {
            $html .= '<a href="' . get_permalink($gallery_id) . '" title="' . esc_attr(get_the_title($gallery_id)) . '">' . get_the_title($gallery_id) . '</a>' . $separator;
        }
        $html .= miss_breadcrumbs_bold(get_the_title(), $args['bold']);
    } elseif (is_singular()) {
        $post_id = (int) $wp_query->get_queried_object_id();
        if (isset($wp_query) && isset($wp_query->post) && is_object($wp_query->post)) {
            if ('page' === $wp_query->post->post_type || 'pricetable' === $wp_query->post->post_type) {
                $html .= $home . $separator;
            } elseif ('page' !== $wp_query->post->post_type) {
                $html .= $bloglink . $separator;
                if (isset($args["singular_{$wp_query->post->post_type}_taxonomy"]) && is_taxonomy_hierarchical($args["singular_{$wp_query->post->post_type}_taxonomy"])) {
                    $terms = wp_get_object_terms($post_id, $args["singular_{$wp_query->post->post_type}_taxonomy"]);
                    $html .= miss_breadcrumbs_get_term_parents($terms[0], $args["singular_{$wp_query->post->post_type}_taxonomy"], $separator) . $separator;
                } elseif (isset($args["singular_{$wp_query->post->post_type}_taxonomy"])) {
                    $html .= get_the_term_list($post_id, $args["singular_{$wp_query->post->post_type}_taxonomy"], '', ', ', '') . $separator;
                }
            }
            if ((is_post_type_hierarchical($wp_query->post->post_type) || 'attachment' === $wp_query->post->post_type) && ($parents = miss_breadcrumbs_get_parents($wp_query->post->post_parent, $separator))) {
                $html .= $parents . $separator;
            }
        } else {
            if (miss_is_bp()) {
                $html .= $home . $separator;
            }
        }
        $html .= miss_breadcrumbs_bold(get_the_title(), $args['bold']);
    } elseif (is_archive()) {
        $html .= $bloglink . $separator;
        if (is_category() || is_tag() || is_tax()) {
            $term = $wp_query->get_queried_object();
            $taxonomy = get_taxonomy($term->taxonomy);
            if (is_taxonomy_hierarchical($term->taxonomy) && $term->parent && ($parents = miss_breadcrumbs_get_term_parents($term->parent, $term->taxonomy, $separator))) {
                $html .= $parents . $separator;
            }
            $html .= miss_breadcrumbs_bold($term->name, $args['bold']);
        } elseif (get_post_type() == 'news') {
            $html .= miss_breadcrumbs_bold(__('News', MISS_TEXTDOMAIN));
        } elseif (function_exists('is_post_type_archive') && is_post_type_archive()) {
            $post_type_object = get_post_type_object(get_query_var('post_type'));
            $html .= miss_breadcrumbs_bold($post_type_object->labels->name, $args['bold']);
        } elseif (is_date()) {
            if (is_day()) {
                $html .= miss_breadcrumbs_bold(__('Archives for ', MISS_TEXTDOMAIN) . get_the_time('F j, Y'), $args['bold']);
            } elseif (is_month()) {
                $html .= miss_breadcrumbs_bold(__('Archives for ', MISS_TEXTDOMAIN) . single_month_title(' ', false), $args['bold']);
            } elseif (is_year()) {
                $html .= miss_breadcrumbs_bold(__('Archives for ', MISS_TEXTDOMAIN) . get_the_time('Y'), $args['bold']);
            }
        } elseif (is_author()) {
            $html .= miss_breadcrumbs_bold(__('Archives by: ', MISS_TEXTDOMAIN) . get_the_author_meta('display_name', $wp_query->post->post_author), $args['bold']);
        }
    } elseif (miss_is_bp()) {
        global $bp;
        // we're outside the loop!
        //print_r( $bp );
        if (isset($bp) && is_object($bp) && isset($bp->current_component)) {
            // Assign some variables here
            $homeurl = get_bloginfo('url');
            $bp_page1 = $bp->members->root_slug;
            // bp_get_members_root_slug() // slug for the Members page. The BuddyPress default is 'members'.
            $bp_page2 = $bp->groups->root_slug;
            // bp_get_groups_root_slug() // slug for the Groups page. The BuddyPress default is 'groups'.
            $bp_page3 = $bp->activity->root_slug;
            // bp_get_activity_root_slug() // slug for the Activity page. The BuddyPress default is 'activity'.
            $bp_page4 = $bp->forums->root_slug;
            // bp_get_forums_root_slug() // slug for the Forums page. The BuddyPress default is 'forums'.
            //$bp_page5 = $bp->achievements->root_slug; // slug for the Achievements page. The BuddyPress default is 'achievements'.
            if (bp_is_group()) {
                $html .= $home . $separator . __('Groups', MISS_TEXTDOMAIN);
                if (is_404()) {
                    $html .= $separator . miss_breadcrumbs_bold(__('Not Found', MISS_TEXTDOMAIN), $args['bold']);
                }
            }
            if (bp_is_user() && !bp_is_register_page()) {
                $html .= $home . " {$separator} " . '<a href="' . $homeurl . '/' . $bp_page1 . '/">' . ucwords($bp_page1) . '</a>' . " {$separator} " . '<a href="' . $bp->displayed_user->domain . '">' . ucwords($bp->displayed_user->fullname) . '</a>' . " {$divider} " . ucwords($bp->current_component) . "";
            }
            if (!bp_is_blog_page() && (is_page() || is_page($bp_page1) || is_page($bp_page2) || is_page($bp_page3) || is_page($bp_page4)) && !bp_is_user() && !bp_is_single_item() && !bp_is_register_page()) {
                $html .= $home . " {$separator} " . get_the_title() . "";
            }
            if (bp_is_register_page()) {
                $html .= $home . " {$separator} " . get_the_title() . "";
            }
            if (bp_is_blog_page() && is_home() && $front == "page") {
                $html .= "<a href='" . $homeurl . "'>{$home}</a>" . " {$separator} " . $blog . "";
            }
            if (get_query_var('paged')) {
                if (bp_is_blog_page() && !(is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author())) {
                    $html .= ' (Page' . ' ' . get_query_var('paged') . ')';
                }
            }
            /* 		$html .= $home . $separator . miss_breadcrumbs_bold( __( 'Search results for "', MISS_TEXTDOMAIN ) . stripslashes( strip_tags( get_search_query() ) ) . '"', $args['bold'] ); */
        }
    } elseif (is_search()) {
        $html .= $home . $separator . miss_breadcrumbs_bold(__('Search results for "', MISS_TEXTDOMAIN) . stripslashes(strip_tags(get_search_query())) . '"', $args['bold']);
    } elseif (is_404()) {
        $html .= $home . $separator . miss_breadcrumbs_bold(__('Page Not Found', MISS_TEXTDOMAIN), $args['bold']);
    } else {
        $html = '';
    }
    if (class_exists('TribeEventsPro')) {
        if (class_exists('TribeEvents')) {
            $tec = TribeEvents::instance();
            $events_page = '<a href="' . home_url('/') . trailingslashit($tec->getOption('eventsSlug', 'events')) . '" title="' . __('Events', MISS_TEXTDOMAIN) . '">' . __('Events', MISS_TEXTDOMAIN) . '</a>';
            $html_event = $home . $separator . $events_page;
        }
        if (function_exists('tribe_is_month') && tribe_is_month()) {
            $html = $html_event;
            $html .= $separator . __('Events for', MISS_TEXTDOMAIN) . ' ' . Date("F Y", strtotime($wp_query->get('start_date')));
        }
        if (function_exists('tribe_is_day') && tribe_is_day()) {
            $html = $html_event;
            $html .= $separator . __('Events for', MISS_TEXTDOMAIN) . ' ' . Date("l, F jS Y", strtotime($wp_query->get('start_date')));
        }
        if (function_exists('tribe_is_week') && tribe_is_week()) {
            if (function_exists('tribe_get_first_week_day')) {
                $html = $html_event;
                $html .= $separator . sprintf(__('Events for week of %s', MISS_TEXTDOMAIN), Date("l, F jS Y", strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
            }
        }
        if (function_exists('tribe_is_map') && tribe_is_map() || function_exists('tribe_is_photo') && tribe_is_photo()) {
            if (tribe_is_past()) {
                $html = $html_event;
                $html .= $separator . __('Past Events', MISS_TEXTDOMAIN);
            } else {
                $html = $html_event;
                $html .= $separator . __('Upcoming Events', MISS_TEXTDOMAIN);
            }
        }
        if (function_exists('tribe_is_showing_all') && tribe_is_showing_all()) {
            $html = $html_event;
            $html .= $separator . sprintf('%s %s', __('All events for', MISS_TEXTDOMAIN), get_the_title());
        }
    }
    //$breadcrumbs = '<div class="breadcrumb breadcrumbs"><div class="breadcrumbs-plus">';
    $breadcrumbs = $args['prefix'];
    $breadcrumbs .= $html;
    $breadcrumbs .= $args['suffix'];
    //$breadcrumbs .= '</div></div>';
    $breadcrumbs = apply_filters('miss_get_breadcrumbs', $breadcrumbs);
    if (!$args['echo']) {
        return $breadcrumbs;
    }
    echo $breadcrumbs;
}
Example #8
0
 /**
  * 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();
     }
 }
 /**
  * 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);
             }
         }
     }
 }
 /**
  * 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'));
     }
 }
Example #11
0
 /**
  *
  */
 function miss_page_title()
 {
     global $irish_framework_params, $wp_query;
     if (is_front_page()) {
         return;
     }
     if (miss_is_template('templates/template-home.php')) {
         return;
     }
     $post_obj = $wp_query->get_queried_object();
     if (!empty($post_obj) && !empty($post_obj->ID) && get_post_meta($post_obj->ID, '_disable_page_title', true)) {
         return;
     }
     $title = '';
     if (is_404()) {
         $title = __('The requested page could not be found', MISS_TEXTDOMAIN);
         $page_tagline = __('Error 404', MISS_TEXTDOMAIN);
     }
     /**
      * Events Calendar PRO Support
      * 
      * @since 1.8
      */
     if (class_exists('TribeEventsPro')) {
         if (function_exists('tribe_is_month') && tribe_is_month()) {
             $title = __('Events for', MISS_TEXTDOMAIN);
             $page_tagline = Date("F Y", strtotime($wp_query->get('start_date')));
         }
         if (function_exists('tribe_is_day') && tribe_is_day()) {
             $title = __('Events for', MISS_TEXTDOMAIN);
             $page_tagline = Date("l, F jS Y", strtotime($wp_query->get('start_date')));
         }
         if (function_exists('tribe_is_week') && tribe_is_week()) {
             if (function_exists('tribe_get_first_week_day')) {
                 $title = sprintf(__('Events for week of %s', MISS_TEXTDOMAIN), Date("l, F jS Y", strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
             }
             $page_tagline = '';
         }
         if (function_exists('tribe_is_map') && tribe_is_map() || function_exists('tribe_is_photo') && tribe_is_photo()) {
             if (tribe_is_past()) {
                 $title = __('Past Events', MISS_TEXTDOMAIN);
             } else {
                 $title = __('Upcoming Events', MISS_TEXTDOMAIN);
             }
             $page_tagline = '';
         }
         if (function_exists('tribe_is_showing_all') && tribe_is_showing_all()) {
             $title = sprintf('%s %s', __('All events for', MISS_TEXTDOMAIN), get_the_title());
             $page_tagline = '';
         }
     }
     $intro_options = miss_get_setting('intro_options');
     if (is_search()) {
         $title = sprintf(__('Search Results for: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . get_search_query() . '&rsquo;');
     } elseif (is_category()) {
         $title = sprintf(__('Category Archive for: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . single_cat_title('', false) . '&rsquo;');
     } elseif (is_archive() || is_singular('post')) {
         $title = sprintf(__('%1$s', MISS_TEXTDOMAIN), miss_get_setting(get_post_type() . '_page_caption') ? miss_get_setting(get_post_type() . '_page_caption') : get_post_type());
     } elseif (is_tag()) {
         $title = sprintf(__('All Posts Tagged Tag: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . single_tag_title('', false) . '&rsquo;');
     } elseif (is_day()) {
         $title = sprintf(__('Daily Archive for: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . get_the_time('F jS, Y') . '&rsquo;');
     } elseif (is_month()) {
         $title = sprintf(__('Monthly Archive for: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . get_the_time('F, Y') . '&rsquo;');
     } elseif (is_year()) {
         $title = sprintf(__('Yearly Archive for: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . get_the_time('Y') . '&rsquo;');
     } elseif (is_singular('portfolio')) {
         $gallery_id = miss_get_setting('portfolio_page');
         if (!empty($gallery_id)) {
             $title = get_the_title($gallery_id);
         }
     } elseif (function_exists('is_woocommerce') && is_woocommerce()) {
         $shop_page = get_post(woocommerce_get_page_id('shop'));
         $title = miss_get_setting('store_title') ? get_option('store_title') : (get_option('woocommerce_shop_page_title') ? get_option('woocommerce_shop_page_title') : __('Store', MISS_TEXTDOMAIN));
         $page_tagline = miss_get_setting('product_page_tagline') ? get_option('product_page_tagline') : '';
     } elseif (is_author()) {
         global $author;
         $curauth = get_userdata(intval($author));
         $title = sprintf(__('Author Archive for: %1$s', MISS_TEXTDOMAIN), '&lsquo;' . $curauth->nickname . '&rsquo;');
         if (is_search()) {
             $title = printf(__('Search Results: &ldquo;%s&rdquo;', MISS_TEXTDOMAIN), get_search_query());
         } elseif (is_tax()) {
             $title = single_term_title("", false);
         } else {
             $shop_page = get_post(woocommerce_get_page_id('shop'));
             $title = miss_get_setting('store_title') ? get_option('store_title') : (get_option('woocommerce_shop_page_title') ? get_option('woocommerce_shop_page_title') : __('Store', MISS_TEXTDOMAIN));
             $page_tagline = miss_get_setting('product_page_tagline') ? get_option('product_page_tagline') : '';
         }
     }
     if (!empty($title)) {
         if (!empty($page_tagline)) {
             $page_tagline = '<span class="page_tagline">' . $page_tagline . '</span>';
             $title .= $page_tagline;
         }
         return '<h1 class="page_title">' . $title . '</h1>';
     } else {
         global $wp_query;
         $post_obj = $wp_query->get_queried_object();
         $post_id = is_object($post_obj) && isset($post_obj->ID) ? $post_obj->ID : '';
         $page_title = get_the_title($post_id);
         if (empty($page_title)) {
             return false;
         }
         $_layout = get_post_meta($post_id, '_intro_text', true);
         $template = get_post_meta($post_id, '_wp_page_template', true);
         if (!isset($page_tagline)) {
             $page_tagline = get_post_meta($post_id, '_page_tagline', true);
         }
         if (!empty($page_tagline)) {
             $page_tagline = '<span class="page_tagline">' . $page_tagline . '</span>';
         } else {
             $page_tagline = '';
         }
         if (is_page()) {
             if (is_front_page() != 1 || $template != 'templates/template-home.php') {
                 return the_title('<h1 class="page_title">', $page_tagline . '</h1>', false);
             } elseif ($_layout == 'default' && $intro_options == 'disable' && $template != 'templates/template-wiki.php') {
                 return the_title('<h1 class="page_title">', $page_tagline . '</h1>', false);
             }
         } else {
             return '<h1 class="page_title">' . get_the_title($post_id) . $page_tagline . '</h1>';
         }
     }
 }
Example #12
0
 /**
  * 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'));
     }
 }
Example #13
0
 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);
 }
Example #14
0
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;
    }
}
Example #15
0
<?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">
Example #16
0
 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;
 }
Example #17
0
 /**
  * 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('&raquo;', 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 . '"';
     }
 }
 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));
     }
 }
 /**
  * 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);
 }
Example #20
0
 /**
  * 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) . '"';
     }
 }
 /**
  * The List View AJAX handler.
  *
  * @return void
  * @since 3.0
  */
 function list_ajax_call()
 {
     TribeEventsQuery::init();
     $tribe_paged = !empty($_POST['tribe_paged']) ? intval($_POST['tribe_paged']) : 1;
     $args = array('eventDisplay' => 'upcoming', 'post_type' => TribeEvents::POSTTYPE, 'post_status' => 'publish', 'paged' => $tribe_paged);
     // check & set past display
     if (isset($_POST['tribe_event_display']) && $_POST['tribe_event_display'] == 'past') {
         $args['eventDisplay'] = 'past';
     }
     // check & set event category
     if (isset($_POST['tribe_event_category'])) {
         $args[TribeEvents::TAXONOMY] = $_POST['tribe_event_category'];
     }
     $query = TribeEventsQuery::getEvents($args, true);
     $hash = $query->query_vars;
     $hash['paged'] = null;
     $hash['start_date'] = null;
     $hash_str = md5(maybe_serialize($hash));
     if (!empty($_POST['hash']) && $hash_str !== $_POST['hash']) {
         $tribe_paged = 1;
         $args['paged'] = 1;
         $query = TribeEventsQuery::getEvents($args, true);
     }
     $response = array('html' => '', 'success' => true, 'max_pages' => $query->max_num_pages, 'hash' => $hash_str, 'tribe_paged' => $tribe_paged, 'total_count' => $query->found_posts, 'view' => 'list');
     global $wp_query, $post, $paged;
     $wp_query = $query;
     if (!empty($query->posts)) {
         $post = $query->posts[0];
     }
     $paged = $tribe_paged;
     add_filter('tribe_events_list_pagination', array(__CLASS__, 'clear_module_pagination'), 10);
     if ($query->query_vars['eventDisplay'] == 'list') {
         $this->displaying = 'upcoming';
     } elseif ($query->query_vars['eventDisplay'] == 'past') {
         $this->displaying = 'past';
         $response['view'] = 'past';
     }
     $old_request = $_SERVER;
     if (tribe_is_past()) {
         $_SERVER['REQUEST_URI'] = $this->rewriteSlug . '/' . 'past/';
     } else {
         $_SERVER['REQUEST_URI'] = $this->rewriteSlug . '/' . 'upcoming/';
     }
     ob_start();
     tribe_get_view('list/content');
     $response['html'] .= ob_get_clean();
     $_SERVER = $old_request;
     apply_filters('tribe_events_ajax_response', $response);
     header('Content-type: application/json');
     echo json_encode($response);
     die;
 }
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';
        }
    }
}
 /**
  * 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 remove_end_time($formatting_details)
{
    if (tribe_is_past() || tribe_is_upcoming() && !is_tax()) {
        $formatting_details['show_end_time'] = 0;
    }
    return $formatting_details;
}
Example #25
0
 /**
  * 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;
 }
Example #26
0
 /**
  * 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);
 }
Example #27
0
        ?>
" rel="prev" class="btn-text"><?php 
        _e('<span class="icon-arrow-left"></span> Previous <span class="hide-below-480">Classes</span>', 'tribe-events-calendar');
        ?>
</a>
		<?php 
    }
    ?>
		</div>
	<?php 
}
?>

	
	<?php 
if (tribe_is_past()) {
    ?>
		<?php 
    if (get_query_var('paged') > 1) {
        ?>
			<div class="col-xs-6 text-right">
				<a href="<?php 
        echo tribe_get_past_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 
    } elseif (!get_previous_posts_link()) {
        ?>
Example #28
0
		<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 &raquo;', 'tribe-events-calendar') . '</span>');
    ?>
		<?php 
} elseif (tribe_is_past() && get_previous_posts_link()) {
    ?>
			<?php 
    previous_posts_link('<span>' . __('Next Events &raquo;', '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 
    echo tribe_get_upcoming_link();
    ?>
'><span><?php 
    _e('Next Events &raquo;', 'tribe-events-calendar');
    ?>
</span></a>
		<?php 
}
?>
		</div>

	</div>
	<?php 
Example #29
0
 /**
  *
  */
 function miss_document_title()
 {
     global $page, $paged, $wp_query;
     /* Set up some default variables. */
     $domain = MISS_TEXTDOMAIN;
     $doctitle = get_bloginfo('name');
     $separator = ' | ';
     $description = get_bloginfo('description', 'display');
     //$doctitle = get_bloginfo( 'name' );
     /* If viewing the front page and posts page of the site. */
     if (is_front_page() && is_home() && !is_singular()) {
         if ($description != "") {
             $doctitle = $description;
         } else {
             $separator = '';
         }
     }
     /* If viewing the posts page or a singular post. */
     if (is_home() || is_singular()) {
         $post_id = $wp_query->get_queried_object_id();
         $prefix = get_post_meta($post_id, 'Title', true);
         if (empty($prefix) && is_front_page()) {
             $prefix = get_bloginfo('name');
         } elseif (empty($prefix)) {
             $prefix = get_post_field('post_title', $post_id);
         }
     } elseif (is_archive()) {
         /* If viewing a taxonomy term archive. */
         if (is_category() || is_tag() || is_tax()) {
             $term = $wp_query->get_queried_object();
             $prefix = $term->name;
         } elseif (function_exists('is_post_type_archive') && is_post_type_archive()) {
             $post_type = get_post_type_object(get_query_var('post_type'));
             $prefix = miss_get_setting(get_post_type() . '_page_caption') ? miss_get_setting(get_post_type() . '_page_caption') : $post_type->labels->name;
         } elseif (is_author()) {
             $prefix = get_the_author_meta('display_name', get_query_var('author'));
         } elseif (is_date()) {
             if (get_query_var('minute') && get_query_var('hour')) {
                 $prefix = sprintf(__('Archive for %1$s', MISS_TEXTDOMAIN), get_the_time(__('g:i a', MISS_TEXTDOMAIN)));
             } elseif (get_query_var('minute')) {
                 $prefix = sprintf(__('Archive for minute %1$s', MISS_TEXTDOMAIN), get_the_time(__('i', MISS_TEXTDOMAIN)));
             } elseif (get_query_var('hour')) {
                 $prefix = sprintf(__('Archive for %1$s', MISS_TEXTDOMAIN), get_the_time(__('g a', MISS_TEXTDOMAIN)));
             } elseif (is_day()) {
                 $prefix = sprintf(__('Archive for %1$s', MISS_TEXTDOMAIN), get_the_time(__('F jS, Y', MISS_TEXTDOMAIN)));
             } elseif (get_query_var('w')) {
                 $prefix = sprintf(__('Archive for week %1$s of %2$s', MISS_TEXTDOMAIN), get_the_time(__('W', MISS_TEXTDOMAIN)), get_the_time(__('Y', MISS_TEXTDOMAIN)));
             } elseif (is_month()) {
                 $prefix = sprintf(__('Archive for %1$s', MISS_TEXTDOMAIN), single_month_title(' ', false));
             } elseif (is_year()) {
                 $prefix = sprintf(__('Archive for %1$s', MISS_TEXTDOMAIN), get_the_time(__('Y', MISS_TEXTDOMAIN)));
             }
         }
     } elseif (is_search()) {
         $prefix = sprintf(__('Search results for &quot;%1$s&quot;', MISS_TEXTDOMAIN), esc_attr(get_search_query()));
     } elseif (is_404()) {
         $prefix = __('404 Not Found', MISS_TEXTDOMAIN);
     } elseif (function_exists('bp_is_activity_component') && bp_is_activity_component()) {
         $prefix = __('Activity', MISS_TEXTDOMAIN);
     } elseif (function_exists('bp_is_group') && bp_is_group()) {
         $prefix = __('Group', MISS_TEXTDOMAIN);
     }
     /**
      * Events Calendar PRO Support
      * 
      * @since 1.8
      */
     if (class_exists('TribeEventsPro')) {
         if (function_exists('tribe_is_month') && tribe_is_month()) {
             $prefix = __('Events for', MISS_TEXTDOMAIN);
             $prefix .= Date("F Y", strtotime($wp_query->get('start_date')));
         }
         if (function_exists('tribe_is_day') && tribe_is_day()) {
             $prefix = __('Events for', MISS_TEXTDOMAIN);
             $prefix .= Date("l, F jS Y", strtotime($wp_query->get('start_date')));
         }
         if (function_exists('tribe_is_week') && tribe_is_week()) {
             if (function_exists('tribe_get_first_week_day')) {
                 $prefix = sprintf(__('Events for week of %s', MISS_TEXTDOMAIN), Date("l, F jS Y", strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
             }
             //$page_tagline = Date("l, F jS Y", strtotime($wp_query->get('start_date') ) );
         }
         if (function_exists('tribe_is_map') && tribe_is_map() || function_exists('tribe_is_photo') && tribe_is_photo()) {
             if (tribe_is_past()) {
                 $prefix = __('Past Events', MISS_TEXTDOMAIN);
             } else {
                 $prefix = __('Upcoming Events', MISS_TEXTDOMAIN);
             }
         }
         if (function_exists('tribe_is_showing_all') && tribe_is_showing_all()) {
             $prefix = sprintf('%s %s', __('All events for', MISS_TEXTDOMAIN), get_the_title());
         }
     }
     /* If the current page is a paged page. */
     if ((($page = $wp_query->get('paged')) || ($page = $wp_query->get('page'))) && $page > 1) {
         $prefix = sprintf(__('%1$sPage %2$s', MISS_TEXTDOMAIN), $prefix . $separator, number_format_i18n($page));
     }
     if (is_front_page()) {
         $doctitle = $doctitle . $separator . $description;
     } else {
         $doctitle = $prefix . $separator . $doctitle;
     }
     /* Apply the wp_title filters so we're compatible with plugins. */
     $doctitle = apply_filters('wp_title', $doctitle, '', '');
     /* Return the title to the screen. */
     return apply_atomic('document_title', esc_attr($doctitle));
 }
Example #30
0
/**
 * 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);
}