echo sprintf(__('Events for %s', Eab_EventsHub::TEXT_DOMAIN), date_i18n("F Y", $time)); ?> </h2> <div class="wpmudevevents-list"> <?php if (!class_exists('Eab_CalendarTable_EventArchiveCalendar')) { require_once EAB_PLUGIN_DIR . 'lib/class_eab_calendar_helper.php'; } $renderer = new Eab_CalendarTable_EventArchiveCalendar($wp_query->posts); echo $renderer->get_month_calendar($time); ?> <div class="event-pagination"> <?php $prev = $time - 28 * 86400; $next = $time + 32 * 86400; ?> <a href="<?php echo Eab_Template::get_archive_url($prev, true); ?> ">Prev</a> <a href="<?php echo Eab_Template::get_archive_url($next, true); ?> ">Next</a> </div> </div> </div> </div> <?php get_footer('event');
protected function _get_navigation_row($position) { if (!$this->_navigation) { return false; } global $post; $time = $this->get_timestamp(); $calendar_class = $this->get_calendar_class(); $row_class = "eab-calendar-title {$calendar_class}-title-{$position}"; $short_attribute = $this->_short_title_format ? 'datetime="' . esc_attr(date_i18n($this->_short_title_format, $time)) . '"' : ''; $title_format = 'top' == $position ? date_i18n($this->_title_format, $time) : date_i18n($this->_title_format, $time); $title_link = '<a href="' . Eab_Template::get_archive_url($time, true) . '" class="' . $calendar_class . '-navigation-link eab-cuw-calendar_date">' . "<time {$short_attribute}>" . "<span>{$title_format}</span>" . '</time>' . '</a>'; $positional_id = $this->_track ? esc_attr('eab-calendar-' . preg_replace('/[^-_a-z0-9]/', '-', $calendar_class)) : ''; $id_attr = $this->_track ? "id='{$positional_id}'" : ''; $id_href = $this->_track ? "#{$positional_id}" : ''; $title = 'top' == $position ? "<h4 {$id_attr}>{$title_link}</h4>" : "<b>{$title_link}</b>"; return "<tr class='{$row_class}'>" . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-prev eab-time_unit-year" href="' . esc_url(add_query_arg('date', date('Y-m', $time - 366 * 86400))) . $id_href . '">' . ' «' . '</a>' . '</td>' . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-prev eab-time_unit-month" href="' . esc_url(add_query_arg('date', date('Y-m', $time - 28 * 86400))) . $id_href . '">' . ' ‹' . '</a>' . '</td>' . '<td colspan="3" style="text-align:center;">' . '<input type="hidden" class="eab-cuw-calendar_date" value="' . $time . '" />' . $title . '</td>' . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-next eab-time_unit-month" href="' . esc_url(add_query_arg('date', date('Y-m', $time + 32 * 86400))) . $id_href . '">' . '› ' . '</a>' . '</td>' . '<td>' . '<a class="' . $calendar_class . '-navigation-link eab-navigation-next eab-time_unit-year" href="' . esc_url(add_query_arg('date', date('Y-m', $time + 366 * 86400))) . $id_href . '">' . '» ' . '</a>' . '</td>' . '</tr>'; }