diff --git a/templates/team-events.php b/templates/team-events.php index c63ed084..dafbd35f 100644 --- a/templates/team-events.php +++ b/templates/team-events.php @@ -13,10 +13,11 @@ if ( ! isset( $id ) ) $id = get_the_ID(); $format = get_option( 'sportspress_team_events_format', 'blocks' ); -if ( 'calendar' === $format ) +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 +25,9 @@ elseif ( 'list' === $format ) 'time_format' => 'separate', 'columns' => array( 'event', 'time', 'results' ), 'order' => 'DESC', - ) ); -else + ); + $args = apply_filters( 'sp_team_events_list_args', $args ); + sp_get_template( 'event-list.php', $args ); +} else { sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) ); +}