Add placeholder feature to auto-populate data table

This commit is contained in:
Takumi
2013-07-31 18:06:57 +10:00
parent b355a7bb4c
commit 5809170073
6 changed files with 49 additions and 22 deletions

View File

@@ -41,7 +41,7 @@ function sp_player_stats_meta( $post ) {
$data = sp_array_combine( $teams, sp_array_value( $stats, 0, array() ) );
?>
<p><strong><?php _e( 'Overall', 'sportspress' ); ?></strong></p>
<?php sp_data_table( $data, 0, array( 'Team', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ) ); ?>
<?php sp_stats_table( $data, array(), 0, array( 'Team', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ) ); ?>
<?php
// Leagues
@@ -50,7 +50,7 @@ function sp_player_stats_meta( $post ) {
$data = sp_array_combine( $teams, sp_array_value( $stats, $league->term_id, array() ) );
?>
<p><strong><?php echo $league->name; ?></strong></p>
<?php sp_data_table( $data, $league->term_id, array( 'Team', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ) ); ?>
<?php sp_stats_table( $data, array(), $league->term_id, array( 'Team', 'Played', 'Goals', 'Assists', 'Yellow Cards', 'Red Cards' ) ); ?>
<?php
endforeach;