当前位置: 首页>>代码示例>>PHP>>正文


PHP tribe_get_month_view_date函数代码示例

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


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

示例1: tribe_events_the_mini_calendar_header_attributes

/**
 * Output data attributes needed to update the month with ajax
 *
 * @return void
 **/
function tribe_events_the_mini_calendar_header_attributes()
{
    $args = tribe_events_get_mini_calendar_args();
    if (is_array($args['tax_query'])) {
        $args['tax_query'] = json_encode($args['tax_query']);
    }
    $html = '';
    $html .= ' data-count="' . esc_attr($args['count']) . '"';
    $html .= ' data-eventDate="' . esc_attr(tribe_get_month_view_date()) . '"';
    $html .= ' data-tax-query="' . esc_attr($args['tax_query']) . '"';
    $html .= ' data-nonce="' . wp_create_nonce('calendar-ajax') . '"';
    echo apply_filters('tribe_events_the_mini_calendar_header_attributes', $html);
}
开发者ID:TravisSperry,项目名称:mpa_website,代码行数:18,代码来源:widgets.php

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

示例3: get_header

<?php

/*
Template Name: Custom Homepage Template
*/
get_header();
$date = tribe_get_month_view_date();
?>

<h1 class="page-title visually-hidden">Welcome to Seniors Outdoors!</h1>

<div class="page-content">

    <section class="featured">
        <?php 
$found = false;
$wp_query = new WP_Query('post_type=tribe_events');
if ($wp_query->have_posts()) {
    while ($wp_query->have_posts()) {
        $wp_query->the_post();
        if (has_term('featured-event', 'tribe_events_cat') and !$found) {
            $other_info = get_field('other_info');
            $venue = tribe_get_venue();
            $found = true;
            ?>

    			    <h2 class="event-title purple-dark"><?php 
            the_title();
            ?>
</h2>
    			    <p class="single-space"><?php 
开发者ID:lizbur10,项目名称:js_finalproject,代码行数:31,代码来源:template_home.php

示例4: tribe_get_next_month_text

 /**
  * Next Month Text
  *
  * Returns a textual description of the next month
  *
  * @return string Name of the next month.
  */
 function tribe_get_next_month_text()
 {
     $tribe_ecp = Tribe__Events__Main::instance();
     try {
         $output = $tribe_ecp->getDateStringShortened($tribe_ecp->nextMonth(tribe_get_month_view_date()));
     } catch (OverflowException $e) {
         $output = '';
     }
     return apply_filters('tribe_get_next_month_text', $output);
 }
开发者ID:simple-beck,项目名称:project-gc,代码行数:17,代码来源:month.php

示例5: 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
  */
 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_past()) {
         $title = __('Past Events', 'tribe-events-calendar');
     }
     if (tribe_is_month()) {
         $title = sprintf(__('Events for %s', 'tribe-events-calendar'), date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())));
     }
     // day view title
     if (tribe_is_day()) {
         $title = __('Events for', 'tribe-events-calendar') . ' ' . date_i18n(tribe_get_date_format(true), strtotime($wp_query->get('start_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:estrategasdigitales,项目名称:Golone,代码行数:35,代码来源:loop.php

示例6: get_month_view_events

 /**
  * Gets all events in the current month, matching those presented in month view
  * by default (and therefore potentially including some events from the tail end
  * of the previous month and start of the following month).
  *
  * We build a fresh 'custom'-type query here rather than taking advantage of the
  * main query since page spoofing can render the actual query and results
  * inaccessible (and it cannot be recovered via a query reset).
  *
  * @return array events in the month
  */
 private static function get_month_view_events()
 {
     global $wp_query;
     $event_date = $wp_query->get('eventDate');
     $month = empty($event_date) ? tribe_get_month_view_date() : $wp_query->get('eventDate');
     $args = array('eventDisplay' => 'custom', 'start_date' => Tribe__Events__Template__Month::calculate_first_cell_date($month), 'end_date' => Tribe__Events__Template__Month::calculate_final_cell_date($month), 'posts_per_page' => -1, 'hide_upcoming' => true);
     /**
      * Provides an opportunity to modify the query args used to build a list of events
      * to export from month view.
      *
      * This could be useful where its desirable to limit the exported data set to only
      * those events taking place in the specific month being viewed (rather than an exact
      * match of the events shown in month view itself, which may include events from
      * adjacent months).
      *
      * @var array  $args
      * @var string $month
      */
     $args = (array) apply_filters('tribe_ical_feed_month_view_query_args', $args, $month);
     return tribe_get_events($args);
 }
开发者ID:AC85,项目名称:musikschule-wp-theme,代码行数:32,代码来源:iCal.php

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

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

示例9: fitclub_tribe_alter_event_archive_titles

 function fitclub_tribe_alter_event_archive_titles($depth)
 {
     // Modify the titles here
     // Some of these include %1$s and %2$s, these will be replaced with relevant dates
     $title_upcoming = esc_html__('Upcoming Events', 'fitclub');
     // List View: Upcoming events
     $title_past = esc_html__('Past Events', 'fitclub');
     // List view: Past events
     $title_range = esc_html__('Events for %1$s - %2$s', 'fitclub');
     // List view: range of dates being viewed
     $title_month = esc_html__('Events for %1$s', 'fitclub');
     // Month View, %1$s = the name of the month
     $title_day = esc_html__('Events for %1$s', 'fitclub');
     // Day View, %1$s = the day
     $title_all = esc_html__('All events for %s', 'fitclub');
     // showing all recurrences of an event, %s = event title
     $title_week = esc_html__('Events for week of %s', 'fitclub');
     // Week view
     // Don't modify anything below this unless you know what it does
     global $wp_query;
     $tribe_ecp = Tribe__Events__Main::instance();
     $date_format = apply_filters('tribe_events_pro_page_title_date_format', tribe_get_date_format(true));
     // Default Title
     $title = $title_upcoming;
     // If there's a date selected in the tribe bar, show the date range of the currently showing events
     if (isset($_REQUEST['tribe-bar-date']) && $wp_query->have_posts()) {
         if ($wp_query->get('paged') > 1) {
             // if we're on page 1, show the selected tribe-bar-date as the first date in the range
             $first_event_date = tribe_get_start_date($wp_query->posts[0], false);
         } else {
             //otherwise show the start date of the first event in the results
             $first_event_date = tribe_format_date($_REQUEST['tribe-bar-date'], false);
         }
         $last_event_date = tribe_get_end_date($wp_query->posts[count($wp_query->posts) - 1], false);
         $title = sprintf($title_range, $first_event_date, $last_event_date);
     } elseif (tribe_is_past()) {
         $title = $title_past;
     }
     // Month view title
     if (tribe_is_month()) {
         $title = sprintf($title_month, date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())));
     }
     // Single view title
     if (tribe_is_event() && is_single()) {
         $title = get_the_title();
     }
     // Day view title
     if (tribe_is_day()) {
         $title = sprintf($title_day, date_i18n(tribe_get_date_format(true), strtotime($wp_query->get('start_date'))));
     }
     // All recurrences of an event
     if (function_exists('tribe_is_showing_all') && tribe_is_showing_all()) {
         $title = sprintf($title_all, get_the_title());
     }
     // Week view title
     if (function_exists('tribe_is_week') && tribe_is_week()) {
         $title = sprintf($title_week, date_i18n($date_format, strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
     }
     if (is_tax($tribe_ecp->get_event_taxonomy()) && $depth) {
         $cat = get_queried_object();
         $title = $cat->name;
     }
     return $title;
 }
开发者ID:themegrill,项目名称:fitclub,代码行数:64,代码来源:fitclub.php

示例10: axiom_tribe_events_get_period_links

 function axiom_tribe_events_get_period_links($links, $page, $delimiter = '')
 {
     if (!empty($links)) {
         return $links;
     }
     global $post;
     if ($page == 'tribe_day' && is_object($post)) {
         $links = '<a class="breadcrumbs_item cat_parent" href="' . tribe_get_gridview_link(false) . '">' . date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())) . '</a>';
     }
     return $links;
 }
开发者ID:pcuervo,项目名称:odc,代码行数:11,代码来源:plugin.tribe-events.php

示例11: get_events_title

function get_events_title()
{
    global $wp_query;
    $title = '';
    $date_format = apply_filters('tribe_events_pro_page_title_date_format', 'l, F jS Y');
    if (tribe_is_month() && !is_tax()) {
        $title = sprintf(__('Events for %s', 'tribe-events-calendar'), date_i18n('F Y', strtotime(tribe_get_month_view_date())));
    } elseif (class_exists('Tribe__Events__Pro__Main') && tribe_is_week()) {
        $title = sprintf(__('Events for week of %s', 'tribe-events-calendar-pro'), date_i18n($date_format, strtotime(tribe_get_first_week_day($wp_query->get('start_date')))));
    } elseif (class_exists('Tribe__Events__Pro__Main') && tribe_is_day()) {
        $title = __('Events for', 'tribe-events-calendar-pro') . ' ' . date_i18n($date_format, strtotime($wp_query->get('start_date')));
    } elseif (class_exists('Tribe__Events__Pro__Main') && (tribe_is_map() || tribe_is_photo())) {
        if (tribe_is_past()) {
            $title = __('Past Events', 'tribe-events-calendar-pro');
        } else {
            $title = __('Upcoming Events', 'tribe-events-calendar-pro');
        }
    } elseif (tribe_is_list_view()) {
        $title = __('Upcoming Events', 'dt_themes');
    } elseif (is_single()) {
        $title = $wp_query->post->post_title;
    } elseif (tribe_is_month() && is_tax()) {
        $term_slug = $wp_query->query_vars['tribe_events_cat'];
        $term = get_term_by('slug', $term_slug, 'tribe_events_cat');
        $name = $term->name;
        $title = $name;
    } elseif (is_tag()) {
        $name = 'Tag Archives';
        $title = $name;
    }
    echo '<h1>' . $title . '</h1>';
}
开发者ID:PNW3DEV,项目名称:iesdb-v1,代码行数:32,代码来源:register_public.php

示例12: getBlogTitle

 function getBlogTitle()
 {
     global $wp_query;
     $page = getBlogType();
     if (themerex_strpos($page, 'woocommerce') !== false) {
         if ($page == 'woocommerce_category') {
             $cat = get_term_by('slug', get_query_var('product_cat'), 'product_cat', ARRAY_A);
             return $cat['name'];
         } else {
             if ($page == 'woocommerce_tag') {
                 return sprintf(__('Tag: %s', 'themerex'), single_tag_title('', false));
             } else {
                 if ($page == 'woocommerce_cart') {
                     return __('Your cart', 'themerex');
                 } else {
                     if ($page == 'woocommerce_checkout') {
                         return __('Checkout', 'themerex');
                     } else {
                         if ($page == 'woocommerce_account') {
                             return __('Account', 'themerex');
                         } else {
                             if ($page == 'woocommerce_product') {
                                 return getPostTitle();
                             } else {
                                 if (($page_id = get_option('woocommerce_shop_page_id')) > 0) {
                                     return getPostTitle($page_id);
                                 }
                                 //__( 'Shop', 'themerex' );
                             }
                         }
                     }
                 }
             }
         }
     } else {
         if (themerex_strpos($page, 'tribe') !== false) {
             //return tribe_get_events_title();
             if ($page == 'tribe_category') {
                 $cat = get_term_by('slug', get_query_var('tribe_events_cat'), 'tribe_events_cat', ARRAY_A);
                 return $cat['name'];
             } else {
                 if ($page == 'tribe_tag') {
                     return sprintf(__('Tag: %s', 'themerex'), single_tag_title('', false));
                 } else {
                     if ($page == 'tribe_venue') {
                         return sprintf(__('Venue: %s', 'themerex'), tribe_get_venue());
                     } else {
                         if ($page == 'tribe_organizer') {
                             return sprintf(__('Organizer: %s', 'themerex'), tribe_get_organizer());
                         } else {
                             if ($page == 'tribe_day') {
                                 return sprintf(__('Daily Events: %s', 'themerex'), date_i18n(tribe_get_date_format(true), strtotime($wp_query->get('start_date'))));
                             } else {
                                 if ($page == 'tribe_month') {
                                     return sprintf(__('Monthly Events: %s', 'themerex'), date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())));
                                 } else {
                                     if ($page == 'tribe_event') {
                                         return getPostTitle();
                                     } else {
                                         return __('Tribe Events', 'themerex');
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         } else {
             if ($page == 'blog') {
                 return __('All Posts', 'themerex');
             } else {
                 if ($page == 'author') {
                     $curauth = get_query_var('author_name') ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
                     return sprintf(__('Author page: %s', 'themerex'), $curauth->display_name);
                 } else {
                     if ($page == 'error') {
                         return __('URL not found', 'themerex');
                     } else {
                         if ($page == 'search') {
                             return sprintf(__('Search Results for: %s', 'themerex'), get_search_query());
                         } else {
                             if ($page == 'archives_day') {
                                 return sprintf(__('Daily Archives: %s', 'themerex'), prepareDateForTranslation(get_the_date()));
                             } else {
                                 if ($page == 'archives_month') {
                                     return sprintf(__('Monthly Archives: %s', 'themerex'), prepareDateForTranslation(get_the_date('F Y')));
                                 } else {
                                     if ($page == 'archives_year') {
                                         return sprintf(__('Yearly Archives: %s', 'themerex'), get_the_date('Y'));
                                     } else {
                                         if ($page == 'category') {
                                             return sprintf(__('%s', 'themerex'), single_cat_title('', false));
                                         } else {
                                             if ($page == 'tag') {
                                                 return sprintf(__('Tag: %s', 'themerex'), single_tag_title('', false));
                                             } else {
                                                 if ($page == 'attachment') {
                                                     return sprintf(__('Attachment: %s', 'themerex'), getPostTitle());
                                                 } else {
                                                     if ($page == 'single') {
//.........这里部分代码省略.........
开发者ID:WestBayResidential,项目名称:wbrsorg,代码行数:101,代码来源:_wp_utils.php

示例13: get_home_url

    ?>
</a></h3>
                        </li>
                    <?php 
}
// End of the loop.
?>
                </ul>
            </div>
            <div class="top-news-wrapp">
                <h2><a href="<?php 
echo get_home_url() . '/events';
?>
">Навігатор подій</a></h2>
                <?php 
$title = sprintf(__('%1$s %2$s', 'tribe-events-calendar'), $events_label_plural, date_i18n(tribe_get_option('monthAndYearFormat', 'F Y'), strtotime(tribe_get_month_view_date())));
?>
                <h5 class="today"><?php 
echo $title;
?>
</h5>
                 <?php 
tribe_show_month();
?>
                <?php 
?>
            </div>
<!--            <div class="event-calendar">-->
<!--                --><?php 
//tribe_show_month();
?>
开发者ID:Alexander-smirnov,项目名称:infomist,代码行数:31,代码来源:frontpage.php

示例14: tribe_get_next_month_text

 /**
  * Next Month Text
  *
  * Returns a textual description of the next month
  *
  * @return string Name of the next month.
  * @since 2.0
  */
 function tribe_get_next_month_text()
 {
     $tribe_ecp = TribeEvents::instance();
     $output = $tribe_ecp->getDateStringShortened($tribe_ecp->nextMonth(tribe_get_month_view_date()));
     return apply_filters('tribe_get_next_month_text', $output);
 }
开发者ID:TyRichards,项目名称:river_of_life,代码行数:14,代码来源:month.php

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


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