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

PHP tribe_is_month函数代码示例

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

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



在下文中一共展示了tribe_is_month函数的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: collapse_sql

    /**
     * Collapses subsequent recurrence records when appropriate (ie, for multi-post type queries where
     * the "Recurring event instances"/show-only-the-first-upcoming-recurring-event setting is enabled).
     *
     * In those situations where we do need to intervene and collapse recurring events, we re-jigger
     * the SQL statement so the GROUP BY collapses records in the expected manner.
     *
     * @param string   $sql   The current SQL statement
     * @param WP_Query $query WP Query object
     *
     * @return string The new SQL statement
     */
    public static function collapse_sql($sql, $query)
    {
        global $wpdb;
        // For month, week and day views we don't want to apply this logic - unless the current query
        // belongs to a widget and just happens to be running inside one of those views
        if (!isset($query->query_vars['is_tribe_widget']) || !$query->query_vars['is_tribe_widget']) {
            if (tribe_is_month() || tribe_is_week() || tribe_is_day()) {
                return $sql;
            }
        }
        // If this is not an event query/a multi post type query there is no need to interfere
        if (empty($query->tribe_is_event) && empty($query->tribe_is_multi_posttype)) {
            return $sql;
        }
        // If the hide-recurring-events setting is not set/is false we do not need to interfere
        if (!isset($query->query_vars['tribeHideRecurrence']) || !$query->query_vars['tribeHideRecurrence']) {
            return $sql;
        }
        // If looking just for fields then let's replace the .ID with *
        if ($query->query_vars['fields'] == 'ids') {
            $sql = preg_replace("/(^SELECT\\s+DISTINCT\\s{$wpdb->posts}.)(ID)/", "\$1*, {$wpdb->postmeta}.meta_value as 'EventStartDate'", $sql);
        }
        if ($query->query_vars['fields'] == 'id=>parent') {
            $sql = preg_replace("/(^SELECT\\s+DISTINCT\\s{$wpdb->posts}.ID,\\s{$wpdb->posts}.post_parent)/", "\$1, {$wpdb->postmeta}.meta_value as 'EventStartDate'", $sql);
        }
        // We need to relocate the SQL_CALC_FOUND_ROWS to the outer query
        $sql = preg_replace('/SQL_CALC_FOUND_ROWS/', '', $sql);
        // We don't want to grab the min EventStartDate or EventEndDate because without a group by that collapses everything
        $sql = preg_replace('/MIN\\((' . $wpdb->postmeta . '|tribe_event_end_date).meta_value\\) as Event(Start|End)Date/', '$1.meta_value as Event$2Date', $sql);
        // Let's get rid of the group by (non-greedily stop before the ORDER BY or LIMIT)
        $sql = preg_replace('/GROUP BY .+?(ORDER|LIMIT)/', '$1', $sql);
        // Once this becomes an inner query we need to avoid duplicating the post_date column (which will
        // otherwise be returned once from wp_posts.* and once as an alias)
        $sql = str_replace('AS post_date', 'AS EventStartDate', $sql);
        // The outer query should order things by EventStartDate in the same direction the inner query does by post date:
        preg_match('/[\\s,](?:EventStartDate|post_date)\\s+(DESC|ASC)/', $sql, $direction);
        $direction = isset($direction[1]) && 'DESC' === $direction[1] ? 'DESC' : 'ASC';
        // Let's extract the LIMIT. We're going to relocate it to the outer query
        $limit_regex = '/LIMIT\\s+[0-9]+(\\s*,\\s*[0-9]+)?/';
        preg_match($limit_regex, $sql, $limit);
        if ($limit) {
            $sql = preg_replace($limit_regex, '', $sql);
            $limit = $limit[0];
        } else {
            $limit = '';
        }
        $group_clause = $query->query_vars['fields'] == 'id=>parent' ? 'GROUP BY ID' : 'GROUP BY IF( post_parent = 0, ID, post_parent )';
        return '
			SELECT
				SQL_CALC_FOUND_ROWS *
			FROM (
				' . $sql . "\n\t\t\t) a\n\t\t\t{$group_clause}\n\t\t\tORDER BY EventStartDate {$direction}\n\t\t\t{$limit}\n\t\t";
    }
开发者ID:TakenCdosG,项目名称:chefs,代码行数:65,代码来源:Queries.php


示例3: __construct

 /**
  * Set the notices used on month view
  *
  * @param array $args Set of $wp_query params for the month view, if none passed then will default to $wp_query
  * @since 3.0
  */
 public function __construct($args = null)
 {
     if ($args === null) {
         global $wp_query;
         $args = $wp_query->query;
     }
     self::$args = $args;
     self::$posts_per_page_limit = apply_filters('tribe_events_month_day_limit', tribe_get_option('monthEventAmount', '3'));
     if (!tribe_is_month()) {
         $this->asset_packages = array();
     }
     parent::__construct();
 }
开发者ID:paarthd,项目名称:gslvpa,代码行数:19,代码来源:month.php


示例4: 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


示例5: __construct

 /**
  * Set the notices used on month view
  *
  * @param array $args Set of $wp_query params for the month view, if none passed then will default to $wp_query
  */
 public function __construct($args = null)
 {
     if ($args === null) {
         global $wp_query;
         $args = $wp_query->query;
     }
     self::$args = $args;
     self::$posts_per_page_limit = apply_filters('tribe_events_month_day_limit', tribe_get_option('monthEventAmount', '3'));
     // don't enqueue scripts and js when we're not constructing month view,
     // they'll have to be enqueued separately
     if (!tribe_is_month()) {
         $this->asset_packages = array();
     }
     parent::__construct();
 }
开发者ID:estrategasdigitales,项目名称:Golone,代码行数:20,代码来源:month.php


示例6: 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


示例7: __construct

 /**
  * Set the notices used on month view
  *
  * @param array $args Set of $wp_query params for the month view, if none passed then will default to $wp_query
  */
 public function __construct($args = null)
 {
     if ($args === null) {
         global $wp_query;
         $args = $wp_query->query;
         if (!empty($wp_query->query_vars['meta_query'])) {
             $args['meta_query'] = $wp_query->query_vars['meta_query'];
         }
     }
     $this->use_cache = tribe_get_option('enable_month_view_cache', false);
     // Cache the result of month/content.php
     if ($this->use_cache) {
         $cache_expiration = apply_filters('tribe_events_month_view_transient_expiration', HOUR_IN_SECONDS);
         $this->html_cache = new Tribe__Events__Template_Part_Cache('month/content.php', serialize($args), $cache_expiration, 'save_post');
     }
     self::$args = $args;
     self::$posts_per_page_limit = apply_filters('tribe_events_month_day_limit', tribe_get_option('monthEventAmount', '3'));
     // don't enqueue scripts and js when we're not constructing month view,
     // they'll have to be enqueued separately
     if (!tribe_is_month()) {
         $this->asset_packages = array();
     }
     parent::__construct();
 }
开发者ID:uoyknaht,项目名称:kc,代码行数:29,代码来源:Month.php


示例8: maybe_add_link

 /**
  * Generates the markup for the "iCal Import" link for the views.
  *
  * @static
  *
  * @param string $content
  *
  * @return string
  */
 public static function maybe_add_link($content)
 {
     global $wp_query;
     $show_ical = apply_filters('tribe_events_list_show_ical_link', true);
     if (!$show_ical) {
         return $content;
     }
     if (tribe_is_month() && !tribe_events_month_has_events()) {
         return $content;
     }
     if (is_single() || !have_posts()) {
         return $content;
     }
     $tec = TribeEvents::instance();
     $view = $tec->displaying;
     if (defined('DOING_AJAX') && DOING_AJAX && isset($wp_query->query_vars['eventDisplay'])) {
         $view = $wp_query->query_vars['eventDisplay'];
     }
     switch (strtolower($view)) {
         case 'month':
             $modifier = __("Month's Events", "tribe-events-calendar-pro");
             break;
         case 'week':
             $modifier = __("Week's Events", "tribe-events-calendar-pro");
             break;
         case 'day':
             $modifier = __("Day's Events", "tribe-events-calendar-pro");
             break;
         default:
             $modifier = __("Listed Events", "tribe-events-calendar-pro");
             break;
     }
     $ical = '<a class="tribe-events-ical tribe-events-button" title="' . __('Import is filter/view sensitive', 'tribe-events-calendar-pro') . '" href="' . tribe_get_ical_link() . '">+ ' . __('iCal Import', 'tribe-events-calendar-pro') . ' ' . $modifier . '</a>';
     echo $ical;
     return $content;
 }
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:45,代码来源:tribe-ical.class.php


示例9: 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


示例10: get_current_template_class

 /**
  * Get the correct internal page template
  *
  * @return string Template class
  */
 public static function get_current_template_class()
 {
     $class = '';
     // list view
     if (tribe_is_list_view() || tribe_is_showing_all() || tribe_is_ajax_view_request('list')) {
         $class = 'Tribe__Events__Template__List';
     } elseif (tribe_is_month() || tribe_is_ajax_view_request('month')) {
         $class = 'Tribe__Events__Template__Month';
     } elseif (tribe_is_day() || tribe_is_ajax_view_request('day')) {
         $class = 'Tribe__Events__Template__Day';
     } elseif (is_singular(Tribe__Events__Main::POSTTYPE)) {
         $class = 'Tribe__Events__Template__Single_Event';
     }
     // apply filters
     // @todo remove deprecated filter in 3.4
     return apply_filters('tribe_events_current_template_class', apply_filters('tribe_current_events_template_class', $class));
 }
开发者ID:TMBR,项目名称:johnjohn,代码行数:22,代码来源:Templates.php


示例11: get_current_template_class

 /**
  * Get the correct internal page template
  *
  * @return string Template class
  */
 public static function get_current_template_class()
 {
     $class = '';
     // list view
     if (tribe_is_list_view() || tribe_is_showing_all()) {
         $class = 'Tribe_Events_List_Template';
     } else {
         if (tribe_is_month()) {
             $class = 'Tribe_Events_Month_Template';
         } else {
             if (is_singular(TribeEvents::POSTTYPE)) {
                 $class = 'Tribe_Events_Single_Event_Template';
             }
         }
     }
     // apply filters
     return apply_filters('tribe_current_events_template_class', $class);
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:23,代码来源:tribe-templates.class.php


示例12: category_description



                <?php 
    if (is_category() or is_tax()) {
        ?>
                <div class="tagline">
                    <?php 
        echo category_description();
        ?>
                </div>
                <?php 
    }
    ?>
                <h1>
                    <?php 
    if (tribe_is_month()) {
        echo 'Events';
    } else {
        if (tribe_is_event() && !tribe_is_day() && !is_single()) {
            echo 'Events';
        } else {
            if (is_singular('tribe_events')) {
                echo 'Events';
            } else {
                if (tribe_is_day()) {
                    echo 'Events';
                } else {
                    if (tribe_is_upcoming()) {
                        echo 'Events';
                    } else {
                        if (tribe_is_past()) {
开发者ID:30mps,项目名称:data.gov,代码行数:29,代码来源:header-top-navbar.php


示例13: setup_date_search_in_bar

 /**
  * 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)
 {
     global $wp_query;
     $value = apply_filters('tribe-events-bar-date-search-default-value', '');
     if (!empty($_REQUEST['tribe-bar-date'])) {
         $value = $_REQUEST['tribe-bar-date'];
     }
     $caption = __('Date', 'the-events-calendar');
     if (tribe_is_month()) {
         $caption = sprintf(__('%s In', 'the-events-calendar'), $this->plural_event_label);
     } elseif (tribe_is_list_view()) {
         $caption = sprintf(__('%s From', 'the-events-calendar'), $this->plural_event_label);
     } elseif (tribe_is_day()) {
         $caption = __('Day Of', 'the-events-calendar');
         $value = date(Tribe__Events__Date_Utils::DBDATEFORMAT, strtotime($wp_query->query_vars['eventDate']));
     }
     $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="' . esc_attr__('Date', 'the-events-calendar') . '"><input type="hidden" name="tribe-bar-date-day" id="tribe-bar-date-day" class="tribe-no-param" value="">');
     return $filters;
 }
开发者ID:kevinaxu,项目名称:99boulders,代码行数:27,代码来源:Main.php


示例14: 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


示例15: get_header

<?php

global $avia_config;
/*
 * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
 */
get_header();
$title = tribe_is_month() ? __('Calendar of Events', 'avia_framework') : tribe_get_events_title(false);
$args = array('title' => $title, 'link' => '');
if (!is_singular() || get_post_meta(get_the_ID(), 'header', true) != 'no') {
    echo avia_title($args);
}
?>

		<div class='container_wrap container_wrap_first main_color fullsize'>

			<div class='container'>

				<main class='template-page template-event-page content av-content-full units' <?php 
avia_markup_helper(array('context' => 'content', 'post_type' => 'page'));
?>
>
					
					 <div id="tribe-events-pg-template">
                   
                 	<?php 
tribe_events_before_html();
tribe_get_view();
tribe_events_after_html();
?>
					
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:30,代码来源:default-template.php


示例16: tribe_get_events_title

 /**
  * Event Title
  *
  * Return an event's title with pseudo-breadcrumb if on a category
  *
  * @param bool $depth include linked title
  * @return string title
  * @since 2.0
  */
 function tribe_get_events_title($depth = true)
 {
     global $wp_query;
     $tribe_ecp = TribeEvents::instance();
     $title = __('Upcoming Events', 'tribe-events-calendar');
     // TODO: Use the displayed dates for the title
     /*
     		if ( tribe_is_upcoming() || isset( $_REQUEST['tribe-bar-date'] ) ) {
     
     			$start_date = date( 'Y-m-d', strtotime( $wp_query->get( 'start_date' ) ) );
     
     			if ( $wp_query->get( 'start_date' ) && $start_date != date('Y-m-d') ) {
     
     				if ( get_query_var('paged') > 1 ) {
     					// get the date of the first post
     					$first_post = reset($wp_query->posts);
     					$start_date = date('Y-m-d', strtotime($first_post->EventStartDate));
     				}
     				$format = __('Events for %1$s', 'tribe-events-calendar');
     				$args = array(date_i18n( get_option( 'date_format', 'Y-m-d' ), strtotime($start_date) ));
     
     				// Get the date of the last post
     				if ( count($wp_query->posts) > 1 ) {
     					$last_post = end($wp_query->posts);
     					$last_post_date = date('Y-m-d', strtotime($last_post->EventStartDate));
     					if ( $last_post_date != $start_date ) {
     						$format = __('Events for %1$s through %2$s', 'tribe-events-calendar');
     						$args[] = date_i18n( get_option( 'date_format', 'Y-m-d' ), strtotime($last_post_date) );
     					}
     				}
     				$title = vsprintf($format, $args); 
     			}
     		} else */
     if (tribe_is_past()) {
         $title = __('Past Events', 'tribe-events-calendar');
     }
     if (tribe_is_month()) {
         $title = sprintf(__('Events for %s', 'tribe-events-calendar'), date_i18n(__('F Y', 'tribe-events-calendar'), strtotime(tribe_get_month_view_date())));
     }
     if (is_tax($tribe_ecp->get_event_taxonomy())) {
         $cat = get_queried_object();
         if ($depth) {
             $title = '<a href="' . tribe_get_events_link() . '">' . $title . '</a>';
             $title .= ' &#8250; ' . $cat->name;
         } else {
             $title = $cat->name;
         }
     }
     return apply_filters('tribe_template_factory_debug', apply_filters('tribe_get_events_title', $title), 'tribe_get_events_title');
 }
开发者ID:robertark,项目名称:the-events-calendar,代码行数:59,代码来源:loop.php


示例17: mfn_sidebar_classes

 function mfn_sidebar_classes($has_both = false)
 {
     $classes = false;
     $both = false;
     if (mfn_ID()) {
         if (get_post_type() == 'page' && mfn_opts_get('single-page-layout')) {
             // Theme Options | Single - Page
             $layout = mfn_opts_get('single-page-layout');
         } elseif (get_post_type() == 'post' && is_single() && mfn_opts_get('single-layout')) {
             // Theme Options | Single - Post
             $layout = mfn_opts_get('single-layout');
         } elseif (get_post_type() == 'portfolio' && is_single() && mfn_opts_get('single-portfolio-layout')) {
             // Theme Options | Single - Portfolio
             $layout = mfn_opts_get('single-portfolio-layout');
         } else {
             // Post Meta
             $layout = get_post_meta(mfn_ID(), 'mfn-post-layout', true);
         }
         switch ($layout) {
             case 'left-sidebar':
                 $classes = ' with_aside aside_left';
                 break;
             case 'right-sidebar':
                 $classes = ' with_aside aside_right';
                 break;
             case 'both-sidebars':
                 $classes = ' with_aside aside_both';
                 $both = true;
                 break;
         }
         // demo
         if ($_GET && key_exists('mfn-s', $_GET)) {
             if ($_GET['mfn-s']) {
                 $classes = ' with_aside aside_right';
             } else {
                 $classes = false;
             }
         }
     }
     // WooCommerce
     if (function_exists('is_woocommerce')) {
         if (is_woocommerce()) {
             if ($layout == 'both-sidebars') {
                 // Only one sidebar for shop
                 $classes = ' with_aside aside_right';
             } elseif (!$layout) {
                 // BeTheme version < 6.4 | DO NOT DELETE
                 if (is_active_sidebar('shop')) {
                     $classes = ' with_aside aside_right';
                 }
             }
         }
         if (is_product() && mfn_opts_get('shop-sidebar') == 'shop') {
             $classes = false;
         }
     }
     // bbPress
     if (function_exists('is_bbpress') && is_bbpress() && is_active_sidebar('forum')) {
         $classes = ' with_aside aside_right';
     }
     // BuddyPress
     if (function_exists('is_buddypress') && is_buddypress() && is_active_sidebar('buddy')) {
         $classes = ' with_aside aside_right';
     }
     // Events Calendar
     if (function_exists('tribe_is_month') && is_active_sidebar('events')) {
         if (tribe_is_month() || tribe_is_day() || tribe_is_event() || tribe_is_event_query() || tribe_is_venue()) {
             $classes = ' with_aside aside_right';
         }
     }
     // check if has both sidebars
     if ($has_both) {
         return $both;
     }
     // Page Template: Blank Page, Under Construction
     if (is_page_template('template-blank.php') || is_page_template('under-construction.php')) {
         $classes = false;
     }
     return $classes;
 }
开发者ID:vinodhip,项目名称:Function-22-Website,代码行数:80,代码来源:theme-head.php


示例18: tribe_recurring_instances_toggle

 function tribe_recurring_instances_toggle($postId = null)
 {
     $hide_recurrence = !empty($_REQUEST['tribeHideRecurrence']) && $_REQUEST['tribeHideRecurrence'] == '1' || empty($_REQUEST['tribeHideRecurrence']) && empty($_REQUEST['action']) && tribe_get_option('hideSubsequentRecurrencesDefault', false) ? '1' : false;
     if (!tribe_is_week() && !tribe_is_month()) {
         echo '<span class="tribe-events-user-recurrence-toggle">';
         echo '<label for="tribeHideRecurrence">';
         echo '<input type="checkbox" name="tribeHideRecurrence" value="1" id="tribeHideRecurrence" ' . checked($hide_recurrence, 1, false) . '>' . __('Show only the first upcoming instance of recurring events', 'tribe-events-calendar-pro');
         echo '</label>';
         echo '</span>';
     }
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:11,代码来源:general.php


示例19: __construct

 /**
  * Set the notices used on month view.
  *
  * @param array $args Set of $wp_query params for the month view, if none passed then will default to $wp_query.
  */
 public function __construct($args = array())
 {
     // set the proper query args
     $this->set_args($args);
     // include child categories in the query, save categories for reuse
     $this->set_queried_event_cats();
     // decide if we should use the month view cache
     $this->use_cache = tribe_get_option('enable_month_view_cache', false);
     // Cache the result of month/content.php
     if ($this->use_cache) {
         $cache_expiration = apply_filters('tribe_events_month_view_transient_expiration', HOUR_IN_SECONDS);
         $this->html_cache = new Tribe__Template_Part_Cache('month/content.php', serialize($this->args), $cache_expiration, 'save_post');
     }
     $this->events_per_day = apply_filters('tribe_events_month_day_limit', tribe_get_option('monthEventAmount', '3'));
     $this->requested_date = $this->requested_date();
     $this->first_grid_date = self::calculate_first_cell_date($this->requested_date);
     $this->final_grid_date = self::calculate_final_cell_date($this->requested_date);
     // get all the ids for the events in this month, speeds up queries
     $this->set_events_in_month();
     // don't enqueue scripts and js when we're not constructing month view,
     // they'll have to be enqueued separately
     if (!tribe_is_month()) {
         $this->asset_packages = array();
     }
     parent::__construct();
 }
开发者ID:acutedeveloper,项目名称:havering-intranet-development,代码行数:31,代码来源:Month.php


示例20: mfn_sidebar_classes

function mfn_sidebar_classes()
{
    $classes = false;
    if (mfn_ID()) {
        if (get_post_type() == 'page' && mfn_opts_get('single-page-layout')) {
            // Theme Options | Page
            $layout = mfn_opts_get('single-page-layout');
        } elseif (get_post_type() == 'post' && is_single() && mfn_opts_get('single-layout')) {
            // Theme Options | Single Post
            $layout = mfn_opts_get('single-layout');
        } else {
            // Post Meta
            $layout = get_post_meta(mfn_ID(), 'mfn-post-layout', true);
        }
        switch ($layout) {
            case 'left-sidebar':
                $classes = ' with_aside aside_left';
                break;
            case 'right-sidebar':
                $classes = ' with_aside aside_right';
                break;
        }
        // demo
        if ($_GET && key_exists('mfn-s', $_GET)) {
            if ($_GET['mfn-s']) {
                $classes = ' with_aside aside_right';
            } else {
                $classes = false;
            }
        }
    }
    // bbPress
    if (function_exists('is_bbpress') && is_bbpress() && is_active_sidebar('forum')) {
        $classes = ' with_aside aside_right';
    }
    // Events Calendar
    if (function_exists('tribe_is_month') && is_active_sidebar('events')) {
        if (tribe_is_month() || tribe_is_day() || tribe_is_event() || tribe_is_event_query() || tribe_is_venue()) {
            $classes = ' with_aside aside_right';
        }
    }
    return $classes;
}
开发者ID:plowzzer,项目名称:betheme_derma,代码行数:43,代码来源:theme-head.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP tribe_is_past函数代码示例发布时间:2022-05-23
下一篇:
PHP tribe_is_map函数代码示例发布时间: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