Allow overriding team events list template arguments
This commit is contained in:
@@ -15,8 +15,8 @@ if ( ! isset( $id ) )
|
|||||||
$format = get_option( 'sportspress_team_events_format', 'blocks' );
|
$format = get_option( 'sportspress_team_events_format', 'blocks' );
|
||||||
if ( 'calendar' === $format )
|
if ( 'calendar' === $format )
|
||||||
sp_get_template( 'event-calendar.php', array( 'team' => $id ) );
|
sp_get_template( 'event-calendar.php', array( 'team' => $id ) );
|
||||||
elseif ( 'list' === $format )
|
elseif ( 'list' === $format ) {
|
||||||
sp_get_template( 'event-list.php', array(
|
$args = array(
|
||||||
'team' => $id,
|
'team' => $id,
|
||||||
'league' => apply_filters( 'sp_team_events_league', 0 ),
|
'league' => apply_filters( 'sp_team_events_league', 0 ),
|
||||||
'season' => apply_filters( 'sp_team_events_season', 0 ),
|
'season' => apply_filters( 'sp_team_events_season', 0 ),
|
||||||
@@ -24,6 +24,8 @@ elseif ( 'list' === $format )
|
|||||||
'time_format' => 'separate',
|
'time_format' => 'separate',
|
||||||
'columns' => array( 'event', 'time', 'results' ),
|
'columns' => array( 'event', 'time', 'results' ),
|
||||||
'order' => 'DESC',
|
'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 ) );
|
sp_get_template( 'event-fixtures-results.php', array( 'team' => $id ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user