Display player metric only when not empty
This commit is contained in:
@@ -2073,6 +2073,10 @@ if ( !function_exists( 'sportspress_get_player_metrics_data' ) ) {
|
|||||||
|
|
||||||
foreach( $metric_labels as $key => $value ):
|
foreach( $metric_labels as $key => $value ):
|
||||||
|
|
||||||
|
$metric = sportspress_array_value( $metrics, $key, null );
|
||||||
|
if ( $metric == null )
|
||||||
|
continue;
|
||||||
|
|
||||||
$data[ $value ] = sportspress_array_value( $metrics, $key, ' ' );
|
$data[ $value ] = sportspress_array_value( $metrics, $key, ' ' );
|
||||||
|
|
||||||
endforeach;
|
endforeach;
|
||||||
|
|||||||
Reference in New Issue
Block a user