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

@@ -16,6 +16,8 @@ $defaults = array(
'date' => 'default',
'date_from' => 'default',
'date_to' => 'default',
'league' => null,
'season' => null,
'number' => -1,
'show_team_logo' => get_option( 'sportspress_event_list_show_logos', 'no' ) == 'yes' ? true : false,
'link_events' => get_option( 'sportspress_link_events', 'yes' ) == 'yes' ? true : false,
@@ -42,6 +44,10 @@ if ( $date_from != 'default' )
$calendar->from = $date_from;
if ( $date_to != 'default' )
$calendar->to = $date_to;
if ( $league )
$calendar->league = $league;
if ( $season )
$calendar->season = $season;
if ( $order != 'default' )
$calendar->order = $order;
$data = $calendar->data();