From e81b94994bceeae1d64b6e924bccaeef874a4503 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 16 Oct 2014 13:51:09 +1100 Subject: [PATCH] Display team checkbox only once in player admin --- .../class-sp-meta-box-player-statistics.php | 35 ++++++++++++------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php index bfbfff37..fbde38d6 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-player-statistics.php @@ -24,14 +24,17 @@ class SP_Meta_Box_Player_Statistics { $league_num = sizeof( $leagues ); // Loop through statistics for each league - if ( $leagues ): foreach ( $leagues as $league ): - ?> -

name; ?>

- data( $league->term_id, true ); - self::table( $post->ID, $league->term_id, $columns, $data, $placeholders, $merged, $seasons_teams ); - - endforeach; endif; + if ( $leagues ): + $i = 0; + foreach ( $leagues as $league ): + ?> +

name; ?>

+ data( $league->term_id, true ); + self::table( $post->ID, $league->term_id, $columns, $data, $placeholders, $merged, $seasons_teams, $i == 0 ); + $i ++; + endforeach; + endif; ?>

@@ -59,10 +62,16 @@ class SP_Meta_Box_Player_Statistics { - + + + + + + + $label ): if ( $key == 'team' ) continue; ?>