Allow overriding team events list template arguments

This commit is contained in:
Nabil Kadimi
2018-09-13 17:40:47 +01:00
committed by GitHub
parent 61bab3cbc8
commit ea093cba6f

View File

@@ -15,8 +15,8 @@ if ( ! isset( $id ) )
$format = get_option( 'sportspress_team_events_format', 'blocks' );
if ( 'calendar' === $format )
sp_get_template( 'event-calendar.php', array( 'team' => $id ) );
elseif ( 'list' === $format )
sp_get_template( 'event-list.php', array(
elseif ( 'list' === $format ) {
$args = array(
'team' => $id,
'league' => apply_filters( 'sp_team_events_league', 0 ),
'season' => apply_filters( 'sp_team_events_season', 0 ),
@@ -24,6 +24,8 @@ elseif ( 'list' === $format )
'time_format' => 'separate',
'columns' => array( 'event', 'time', 'results' ),
'order' => 'DESC',
) );
else
);
$args = apply_filters( 'sportspress_team_events_list_args', $args );
sp_get_template( 'event-list.php', $args );
} else
sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );