From 30df0734a25efb5a14f716d3f3040dd423d2d277 Mon Sep 17 00:00:00 2001 From: Nabil Kadimi Date: Fri, 20 Dec 2019 15:19:16 +0100 Subject: [PATCH] Fix equestion based stats in player lists --- includes/class-sp-player-list.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php index db55a0e4..64cb95f2 100644 --- a/includes/class-sp-player-list.php +++ b/includes/class-sp-player-list.php @@ -597,11 +597,13 @@ class SP_Player_List extends SP_Secondary_Post { endif; endif; - if ( $placeholder !== '' && is_numeric( $placeholder ) ): - $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, 0 ) + $placeholder; - else: - $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' ); - endif; + if ( ! $stat->equation ) { + if ( $placeholder !== '' && is_numeric( $placeholder ) ): + $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, 0 ) + $placeholder; + else: + $placeholder = sp_array_value( $placeholders[ $player_id ], $stat->post_name, '-' ); + endif; + } if ( is_numeric( $placeholder ) && $stat->precision ): $placeholder = number_format( $placeholder, $stat->precision, '.', '' );