Let us reference event vars in team stats
This commit is contained in:
@@ -85,6 +85,13 @@ function sp_table_stats_meta( $post ) {
|
||||
$placeholders[ $team ] = sp_get_stats_row( 'sp_team', $args, true );
|
||||
endforeach;
|
||||
|
||||
sp_stats_table( $data, $placeholders, $league_id, array( 'Team', 'P', 'W', 'D', 'L', 'F', 'A', 'GD', 'Pts' ), false );
|
||||
// Get column names from settings
|
||||
$stats_settings = get_option( 'sportspress_stats' );
|
||||
$columns = sp_get_eos_keys( $stats_settings['team'] );
|
||||
|
||||
// Add first column label
|
||||
array_unshift( $columns, __( 'Team', 'sportspress' ) );
|
||||
|
||||
sp_stats_table( $data, $placeholders, $league_id, $columns, false );
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user