From c51e579de083cc1461856ee0c0857d3c19976dfc Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 22 Sep 2016 14:06:02 +1000 Subject: [PATCH] Skip hidden box score columns in split stats mode --- templates/event-performance.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/event-performance.php b/templates/event-performance.php index 79f2cbd2..9d9ca9a3 100644 --- a/templates/event-performance.php +++ b/templates/event-performance.php @@ -129,6 +129,7 @@ if ( is_array( $teams ) ): } // Initialize labels + $selected = $labels; $labels = array( array(), array() ); // Add positions if applicable @@ -138,6 +139,7 @@ if ( is_array( $teams ) ): // Get labels by section foreach ( $columns as $column ): + if ( ! array_key_exists( $column->post_name, $selected ) ) continue; $section = get_post_meta( $column->ID, 'sp_section', true ); if ( '' === $section ) { $section = -1;