Let us reference event vars in team stats

This commit is contained in:
Takumi
2013-08-23 00:53:31 +10:00
parent 90f59d5648
commit 9fee1468c3
5 changed files with 99 additions and 13 deletions

View File

@@ -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 );
}
?>