From 2d6e48f59326c7ba6d5b0843513aec2e215b72c0 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 13 Feb 2014 17:26:11 +1100 Subject: [PATCH] Display player metric only when not empty --- functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions.php b/functions.php index 1a902c92..ab41991c 100644 --- a/functions.php +++ b/functions.php @@ -2073,6 +2073,10 @@ if ( !function_exists( 'sportspress_get_player_metrics_data' ) ) { foreach( $metric_labels as $key => $value ): + $metric = sportspress_array_value( $metrics, $key, null ); + if ( $metric == null ) + continue; + $data[ $value ] = sportspress_array_value( $metrics, $key, ' ' ); endforeach;