Пример #1
0
/**
 * 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);
}
Пример #2
0
/**
 * 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);
}
Пример #3
0
 * This file contains the day view navigation.
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/day/nav.php
 *
 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>

<h3 class="tribe-events-visuallyhidden"><?php 
esc_html_e('Day Navigation', 'training');
?>
</h3>
<ul class="tribe-events-sub-nav">

	<!-- Previous Page Navigation -->
	<li class="tribe-events-nav-previous"><?php 
tribe_the_day_link('previous day');
?>
</li>

	<!-- Next Page Navigation -->
	<li class="tribe-events-nav-next"><?php 
tribe_the_day_link('next day');
?>
</li>

</ul>