diff --git a/templates/event-performance-table-combined.php b/templates/event-performance-table-combined.php deleted file mode 100644 index 97be55bc..00000000 --- a/templates/event-performance-table-combined.php +++ /dev/null @@ -1,179 +0,0 @@ - -
| # | - -- $label ): ?> - - | - - | - - |
|---|---|---|---|
| ' . $number . ' | '; - endif; - - if ( $link_posts ): - $permalink = get_post_permalink( $player_id ); - $name = '' . $name . ''; - endif; - - echo '' . $name . ' | '; - - if ( $mode == 'icons' ) echo ''; - - foreach ( $labels as $key => $label ): - if ( in_array( $key, array( 'number', 'name' ) ) ) - continue; - - $format = sp_array_value( $formats, $key, 'number' ); - $placeholder = sp_get_format_placeholder( $format ); - - $value = '-'; - if ( $key == 'position' ): - if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ): - $positions = array(); - $position_ids = (array) $row[ $key ]; - foreach ( $position_ids as $position_id ) { - $player_position = get_term_by( 'id', $position_id, 'sp_position' ); - if ( $player_position ) $positions[] = $player_position->name; - } - $value = implode( ', ', $positions ); - endif; - else: - if ( array_key_exists( $key, $row ) && $row[ $key ] != '' ): - $value = $row[ $key ]; - else: - $value = $placeholder; - endif; - endif; - if ( ! array_key_exists( $key, $totals ) ): - $totals[ $key ] = $placeholder; - endif; - - if ( 'number' === $format ) { - $add = floatval( $value ); - $totals[ $key ] += $add; - } - - if ( $mode == 'values' ): - echo ' | ' . $value . ' | '; - elseif ( intval( $value ) && $mode == 'icons' ): - $performance_id = sp_array_value( $performance_ids, $key, null ); - $icons = ''; - if ( $performance_id && has_post_thumbnail( $performance_id ) ): - $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini', array( 'title' => sp_get_singular_name( $performance_id ) ) ) . ' ', $value ); - endif; - echo apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value ); - endif; - endforeach; - - if ( $mode == 'icons' ) echo ''; - - echo '
| ' . __( 'Total', 'sportspress' ) . ' | '; - - $row = sp_array_value( $data, 1, 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; - - if ( $mode == 'values' ): - echo ' | ' . $value . ' | '; - elseif ( intval( $value ) && $mode == 'icons' ): - $performance_id = sp_array_value( $performance_ids, $key, null ); - $icons = ''; - if ( $performance_id && has_post_thumbnail( $performance_id ) ): - $icons = str_repeat( get_the_post_thumbnail( $performance_id, 'sportspress-fit-mini' ) . ' ', $value ); - endif; - echo apply_filters( 'sportspress_event_performance_icons', $icons, $performance_id, $value ); - endif; - endforeach; - - if ( $mode == 'icons' ) echo ''; - ?> -