Add events list template

This commit is contained in:
Brian Miyaji
2014-03-17 19:12:12 +11:00
parent a7eb732933
commit e39b938d6e
12 changed files with 286 additions and 26 deletions

View File

@@ -1,6 +1,6 @@
<?php
if ( !function_exists( 'sportspress_events_calendar' ) ) {
function sportspress_events_calendar( $initial = true ) {
function sportspress_events_calendar( $id = null, $single = false, $initial = true ) {
global $wpdb, $m, $monthnum, $year, $wp_locale, $posts;
@@ -8,6 +8,8 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
if ( !$posts )
return;
$caption_tag = ( $single ? 'h4' : 'caption' );
// week_begins = 0 stands for Sunday
$week_begins = intval(get_option('start_of_week'));
@@ -56,7 +58,7 @@ if ( !function_exists( 'sportspress_events_calendar' ) ) {
$calendar_caption = _x('%1$s %2$s', 'calendar caption', 'sportspress');
$calendar_output = '
<table id="wp-calendar">
<caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
<' . $caption_tag . ' class="sp-table-caption">' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</' . $caption_tag . '>
<thead>
<tr>';