Add season and competition filter to calendars

This commit is contained in:
Brian Miyaji
2015-09-22 21:42:35 +10:00
parent c3e0a68055
commit 94ce8ef8fb
4 changed files with 43 additions and 6 deletions

View File

@@ -17,6 +17,8 @@ $defaults = array(
'date' => 'default',
'date_from' => 'default',
'date_to' => 'default',
'league' => null,
'season' => null,
'initial' => true,
'caption_tag' => 'h4',
'show_all_events_link' => false,
@@ -34,6 +36,10 @@ if ( isset( $id ) ):
$calendar->from = $date_from;
if ( $date_to != 'default' )
$calendar->to = $date_to;
if ( $league )
$calendar->league = $league;
if ( $season )
$calendar->season = $season;
$events = $calendar->data();
$event_ids = array();
foreach ( $events as $event ):