• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tribe_is_past函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中tribe_is_past函数的典型用法代码示例。如果您正苦于以下问题:PHP tribe_is_past函数的具体用法?PHP tribe_is_past怎么用?PHP tribe_is_past使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了tribe_is_past函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: dt_the_events_calendar_template_config

/**
 * 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);
    }
}
开发者ID:severnrescue,项目名称:web,代码行数:13,代码来源:mod-the-events-calendar.php


示例2: tribe_get_next_events_link

 /**
  * 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);
 }
开发者ID:estrategasdigitales,项目名称:Golone,代码行数:16,代码来源:link.php


示例3: wpv_upcoming_events_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;
}
开发者ID:petrfaitl,项目名称:wordpress-event-theme,代码行数:14,代码来源:tribe-events-integration.php


示例4: filter_events_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;
}
开发者ID:petrfaitl,项目名称:wordpress-event-theme,代码行数:47,代码来源:functions.php


示例5: is_events_archive

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;
    }
}
开发者ID:Bakerpedia,项目名称:Development_Site5,代码行数:8,代码来源:functions.php


示例6: sp_is_past

 /**
  * @deprecated
  */
 function sp_is_past()
 {
     _deprecated_function(__FUNCTION__, '2.0', 'tribe_is_past()');
     return tribe_is_past();
 }
开发者ID:brooklyntri,项目名称:btc-plugins,代码行数:8,代码来源:deprecated.php


示例7: miss_get_breadcrumbs


//.........这里部分代码省略.........
                $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;
}
开发者ID:schiz,项目名称:scrollax,代码行数:101,代码来源:breadcrumbs.php


示例8: add_recurring_occurance_setting_to_list

 /**
  * 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();
     }
 }
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:11,代码来源:Main.php


示例9: set_notices

 /**
  * 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);
             }
         }
     }
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:50,代码来源:tribe-template-factory.class.php


示例10: nothing_found_notice

 /**
  * 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'));
     }
 }
开发者ID:chicosilva,项目名称:olharambiental,代码行数:22,代码来源:tribe-template-factory.class.php


示例11: miss_page_title

 /**
  *
  */
 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;
//.........这里部分代码省略.........
开发者ID:schiz,项目名称:scrollax,代码行数:101,代码来源:core.php


示例12: nothing_found_notice

 /**
  * 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'));
     }
 }
开发者ID:awwong1,项目名称:esps-wpsite,代码行数:24,代码来源:Template_Factory.php


示例13: get_current_page_template

 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);
 }
开发者ID:mpaskew,项目名称:isc-dev,代码行数:20,代码来源:tribe-templates.class.php


示例14: is_events_archive

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;
    }
}
开发者ID:ftopolovec,项目名称:proart,代码行数:12,代码来源:functions.php


示例15: get_header

<?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">
开发者ID:smartassdesign,项目名称:bestyle,代码行数:30,代码来源:page-full.php


示例16: fitclub_is_tribe_page

 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;
 }
开发者ID:themegrill,项目名称:fitclub,代码行数:30,代码来源:fitclub.php


示例17: tribe_events_the_header_attributes

 /**
  * 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 . '"';
     }
 }
开发者ID:paarthd,项目名称:gslvpa,代码行数:33,代码来源:general.php


示例18: setReccuringEventDates

 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));
     }
 }
开发者ID:kevinreilly,项目名称:redwood-city-chamber-wp,代码行数:9,代码来源:the-events-calendar.class.php


示例19: tribe_right_navigation_classes

 /**
  * 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);
 }
开发者ID:NallelyFlores89,项目名称:cronica-ambiental,代码行数:17,代码来源:loop.php


示例20: tribe_events_the_header_attributes

 /**
  * 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) . '"';
     }
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:42,代码来源:general.php



注:本文中的tribe_is_past函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tribe_is_recurring_event函数代码示例发布时间:2022-05-23
下一篇:
PHP tribe_is_month函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap