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

PHP tribe_events_get_current_month_day函数代码示例

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

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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