diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php index 9c934e7c..a29f6d52 100644 --- a/includes/class-sp-event.php +++ b/includes/class-sp-event.php @@ -184,7 +184,7 @@ class SP_Event extends SP_Custom_Post{ if ( ! is_array( $players ) ) continue; foreach ( $players as $player => $player_performance ): - if ( ! is_array( $player_performance ) || ! $player ) continue; + if ( ! is_array( $player_performance ) ) continue; // Prepare existing values for equation calculation $vars = $player_performance; diff --git a/templates/event-performance-table.php b/templates/event-performance-table.php index 86cb5a82..a757d7ba 100644 --- a/templates/event-performance-table.php +++ b/templates/event-performance-table.php @@ -236,6 +236,7 @@ $i = 0; if ( $mode == 'icons' ) echo ''; foreach ( $labels as $key => $label ): + $format = sp_array_value( $formats, $key, 'number' ); if ( 'name' == $key ) continue; if ( $key == 'position' ): @@ -243,7 +244,7 @@ $i = 0; else: if ( $primary && $key !== $primary ): $value = ' '; - elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ): + elseif ( 'equation' !== $format && array_key_exists( $key, $row ) && $row[ $key ] != '' ): $value = $row[ $key ]; else: $value = apply_filters( 'sportspress_event_performance_table_total_value', sp_array_value( $totals, $key, 0 ), $data, $key );