diff --git a/templates/event-performance-table-combined.php b/templates/event-performance-table-combined.php index dc49923d..8d543cae 100644 --- a/templates/event-performance-table-combined.php +++ b/templates/event-performance-table-combined.php @@ -112,43 +112,47 @@ $totals = array(); ?> - - -  '; - endif; - echo '' . __( 'Total', 'sportspress' ) . ''; - - $row = sp_array_value( $data, 0, array() ); - - if ( $mode == 'icons' ) echo ''; - - foreach ( $labels as $key => $label ): - if ( in_array( $key, array( 'number', 'name' ) ) ) - continue; - if ( $key == 'position' ): - $value = '—'; - elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ): - $value = $row[ $key ]; - else: - $value = sp_array_value( $totals, $key, 0 ); + + + +  '; endif; + echo '' . __( 'Total', 'sportspress' ) . ''; - if ( $mode == 'values' ): - echo '' . $value . ''; - elseif ( intval( $value ) && $mode == 'icons' ): - $performance_id = sp_array_value( $performance_ids, $key, null ); - if ( $performance_id && has_post_thumbnail( $performance_id ) ): - echo str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value ); + $row = sp_array_value( $data, 0, array() ); + + if ( $mode == 'icons' ) echo ''; + + foreach ( $labels as $key => $label ): + if ( in_array( $key, array( 'number', 'name' ) ) ) + continue; + if ( $key == 'position' ): + $value = '—'; + elseif ( $primary && $key !== $primary ): + $value = ' '; + elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ): + $value = $row[ $key ]; + else: + $value = sp_array_value( $totals, $key, 0 ); endif; - endif; - endforeach; - if ( $mode == 'icons' ) echo ''; - ?> - - + if ( $mode == 'values' ): + echo '' . $value . ''; + elseif ( intval( $value ) && $mode == 'icons' ): + $performance_id = sp_array_value( $performance_ids, $key, null ); + if ( $performance_id && has_post_thumbnail( $performance_id ) ): + echo str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value ); + endif; + endif; + endforeach; + + if ( $mode == 'icons' ) echo ''; + ?> + + +