From d2064603525a1f7a144f35e155dd553f52608dc5 Mon Sep 17 00:00:00 2001 From: Takumi Date: Fri, 23 Aug 2013 01:37:20 +1000 Subject: [PATCH] Use stats setting columns in player list --- list.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/list.php b/list.php index 36ac229d..5479dc91 100644 --- a/list.php +++ b/list.php @@ -100,6 +100,13 @@ function sp_list_stats_meta( $post ) { $placeholders[ $player ] = sp_get_stats_row( 'sp_player', $args, true ); endforeach; - sp_stats_table( $data, $placeholders, $league_id, array( 'Player', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ), false ); + // Get column names from settings + $stats_settings = get_option( 'sportspress_stats' ); + $columns = sp_get_eos_keys( $stats_settings['player'] ); + + // Add first column label + array_unshift( $columns, __( 'Player', 'sportspress' ) ); + + sp_stats_table( $data, $placeholders, $league_id, $columns, false ); } ?> \ No newline at end of file