Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Mini Calendar Widget Grid Template: this override makes it so that the month title (ie, SEP 2013) links to the
- * month view.
- */
- if ( !defined('ABSPATH') ) { die('-1'); }
- $days_of_week = tribe_events_get_days_of_week('short');
- $week = 0;
- ?>
- <div class="tribe-mini-calendar-grid-wrapper">
- <table class="tribe-mini-calendar" <?php tribe_events_the_mini_calendar_header_attributes() ?>>
- <thead class="tribe-mini-calendar-nav">
- <tr>
- <td colspan="7">
- <div>
- <?php
- tribe_events_the_mini_calendar_prev_link();
- $args = tribe_events_get_mini_calendar_args();
- $event_date = isset($args['eventDate']) ? $args['eventDate'] : '';
- if (!empty($event_date)) {
- $month_link = TribeEvents::instance()->getLink('month', substr($event_date, 0, 7), null);
- }
- if (isset($month_link)) {
- echo '<a href="' . $month_link . '">';
- }
- echo '<span id="tribe-mini-calendar-month">';
- tribe_events_the_mini_calendar_title();
- echo '</span>';
- if (isset($month_link)) {
- echo '</a>';
- }
- tribe_events_the_mini_calendar_next_link();
- ?>
- <img id="ajax-loading-mini" src="<?php echo tribe_events_resource_url( 'images/tribe-loading.gif' ) ?>" alt="loading..." />
- </div>
- </td>
- </tr>
- </thead>
- <thead>
- <tr>
- <?php foreach($days_of_week as $day) : ?>
- <th class="tribe-mini-calendar-dayofweek"><?php echo $day ?></th>
- <?php endforeach; ?>
- </tr>
- </thead>
- <tbody class="hfeed vcalendar">
- <tr>
- <?php while (tribe_events_have_month_days()) : tribe_events_the_month_day(); ?>
- <?php if ($week != tribe_events_get_current_week()) : $week++; ?>
- </tr>
- <tr>
- <?php endif; ?>
- <td class="<?php tribe_events_the_month_day_classes() ?>">
- <?php tribe_get_template_part('widgets/mini-calendar/single-day') ?>
- </td>
- <?php endwhile; ?>
- </tr>
- </tbody>
- </table>
- </div> <!-- .tribe-mini-calendar-grid-wrapper -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement