當前位置: 首頁>>代碼示例>>PHP>>正文


PHP tribe_events_get_current_month_day函數代碼示例

本文整理匯總了PHP中tribe_events_get_current_month_day函數的典型用法代碼示例。如果您正苦於以下問題:PHP tribe_events_get_current_month_day函數的具體用法?PHP tribe_events_get_current_month_day怎麽用?PHP tribe_events_get_current_month_day使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了tribe_events_get_current_month_day函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: tribe_events_the_mini_calendar_day_link

/**
 * Output a link for the mini calendar day, includes data attributes needed to update the event list below with ajax
 *
 * @return void
 **/
function tribe_events_the_mini_calendar_day_link()
{
    $day = tribe_events_get_current_month_day();
    $args = tribe_events_get_mini_calendar_args();
    if ($day['total_events'] > 0) {
        // there are events on this day
        if ($args['count'] > 0) {
            // there is an event list under the calendar
            $html = '<a href="#" data-day="' . $day['date'] . '" class="tribe-mini-calendar-day-link">' . $day['daynum'] . '</a>';
        } else {
            // there are no events under the calendar
            if (tribe_events_is_view_enabled('day')) {
                // day view is enabled
                ob_start();
                tribe_the_day_link($day['date'], $day['daynum']);
                $html = ob_get_clean();
            } else {
                // day view is disabled, just show that there are events on the day but don't link anywhere
                $html = '<a href="javascript:void(0)">' . $day['daynum'] . '</a>';
            }
        }
    } else {
        $html = '<span class="tribe-mini-calendar-no-event">' . $day['daynum'] . '</span>';
    }
    echo apply_filters('tribe_events_the_mini_calendar_day_link', $html);
}
開發者ID:TravisSperry,項目名稱:mpa_website,代碼行數:31,代碼來源:widgets.php

示例2: tribe_events_the_mini_calendar_day_link

/**
 * Output a link for the mini calendar day, includes data attributes needed to update the event list below with ajax
 *
 * @return void
 * @since 3.0
 * @author Jessica Yazbek
 **/
function tribe_events_the_mini_calendar_day_link()
{
    $day = tribe_events_get_current_month_day();
    $args = tribe_events_get_mini_calendar_args();
    if ($args['count'] == 0) {
        ob_start();
        tribe_the_day_link($day['date'], $day['daynum']);
        $html = ob_get_clean();
    } elseif ($day['total_events'] > 0) {
        $html = '<a href="#" data-day="' . $day['date'] . '" class="tribe-mini-calendar-day-link">' . $day['daynum'] . '</a>';
    } else {
        $html = '<span class="tribe-mini-calendar-no-event">' . $day['daynum'] . '</span>';
    }
    echo apply_filters('tribe_events_the_mini_calendar_day_link', $html);
}
開發者ID:TyRichards,項目名稱:river_of_life,代碼行數:22,代碼來源:widgets.php

示例3: die

/**
 * Month View Single Day
 * This file contains one day in the month grid
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/month/single-day.php
 *
 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>

<?php 
$day = tribe_events_get_current_month_day();
?>

<?php 
if ($day['date'] != 'previous' && $day['date'] != 'next') {
    ?>

	<!-- Day Header -->
	<div id="tribe-events-daynum-<?php 
    echo $day['daynum'];
    ?>
">

		<?php 
    if ($day['total_events'] > 0 && tribe_events_is_view_enabled('day')) {
        ?>
開發者ID:Vinnica,項目名稱:theboxerboston.com,代碼行數:31,代碼來源:single-day.php

示例4: get_month_view_events

 /**
  * Gets all events in the month
  *
  * @static
  *
  * @return array events in the month
  */
 private static function get_month_view_events()
 {
     do_action('tribe_events_before_view');
     // this will trigger the month view query setup
     $events_posts = array();
     while (tribe_events_have_month_days()) {
         tribe_events_the_month_day();
         $month_day = tribe_events_get_current_month_day();
         if (isset($month_day['events']) && $month_day['total_events'] > 0) {
             $events_posts = array_merge($month_day['events']->posts, $events_posts);
         }
     }
     return $events_posts;
 }
開發者ID:TMBR,項目名稱:johnjohn,代碼行數:21,代碼來源:iCal.php


注:本文中的tribe_events_get_current_month_day函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。