Merge pull request #343 from kadimi/patch-12
Add filter around player event list $args
This commit is contained in:
@@ -15,7 +15,16 @@ if ( ! isset( $id ) )
|
|||||||
$format = get_option( 'sportspress_player_events_format', 'blocks' );
|
$format = get_option( 'sportspress_player_events_format', 'blocks' );
|
||||||
if ( 'calendar' === $format )
|
if ( 'calendar' === $format )
|
||||||
sp_get_template( 'event-calendar.php', array( 'player' => $id ) );
|
sp_get_template( 'event-calendar.php', array( 'player' => $id ) );
|
||||||
elseif ( 'list' === $format )
|
elseif ( 'list' === $format ) {
|
||||||
sp_get_template( 'event-list.php', array( 'player' => $id, 'order' => 'DESC', 'title_format' => 'homeaway', 'time_format' => 'separate', 'columns' => array( 'event', 'time', 'results' ) ) );
|
$args = array(
|
||||||
|
'player' => $id,
|
||||||
|
'title_format' => 'homeaway',
|
||||||
|
'time_format' => 'separate',
|
||||||
|
'columns' => array( 'event', 'time', 'results' ),
|
||||||
|
'order' => 'DESC',
|
||||||
|
);
|
||||||
|
$args = apply_filters( 'sp_player_events_list_args', $args );
|
||||||
|
sp_get_template( 'event-list.php', $args );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sp_get_template( 'event-fixtures-results.php', array( 'player' => $id ) );
|
sp_get_template( 'event-fixtures-results.php', array( 'player' => $id ) );
|
||||||
|
|||||||
Reference in New Issue
Block a user