Add static option to sp_get_stats_row function

This commit is contained in:
Takumi
2013-08-19 20:35:33 +10:00
parent e041dca90d
commit bbaf310465
4 changed files with 44 additions and 12 deletions

View File

@@ -69,8 +69,12 @@ function sp_table_stats_meta( $post ) {
foreach ( $teams as $team ):
$args = array(
'post_type' => 'sp_event',
'meta_key' => 'sp_team',
'meta_value' => $team,
'meta_query' => array(
array(
'key' => 'sp_team',
'value' => $team
)
),
'tax_query' => array(
array(
'taxonomy' => 'sp_league',
@@ -79,7 +83,7 @@ function sp_table_stats_meta( $post ) {
)
)
);
$placeholders[ $team ] = sp_get_stats_row( 'sp_team', $args );
$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 );