Add season and competition filter to calendars
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user