diff --git a/templates/event-performance-table.php b/templates/event-performance-table.php index ed0f4404..1f1d68d6 100644 --- a/templates/event-performance-table.php +++ b/templates/event-performance-table.php @@ -60,7 +60,6 @@ if ( ! isset( $subs ) ) $subs = array(); if ( ! $sub_id ) continue; $index = sp_array_value( $sub, 'sub', 0 ); - $index = substr( $index, 0, strpos( $index, ' ' ) ); $lineup_sub_relation[ $index ] = $sub_id; endforeach; @@ -93,22 +92,9 @@ if ( ! isset( $subs ) ) $subs = array(); if ( array_key_exists( $player_id, $lineup_sub_relation ) ): $name .= ' ' . sp_array_value( sp_array_value( $data, $lineup_sub_relation[ $player_id ], array() ), 'number', null ) . ''; - $sub = sp_array_value( sp_array_value( $data, $lineup_sub_relation[ $player_id ], array() ), 'sub', null ); - if ( $show_minutes && ! empty( $sub ) ): - preg_match( '#\((.*?)\)#', $data[ $lineup_sub_relation[ $player_id ] ]['sub'], $match ); - if ( ! empty( $match ) && isset( $match[1] ) ): - $name .= ' (' . $match[1] . ')'; - endif; - endif; elseif ( isset( $row['sub'] ) && $row['sub'] ): $subbed = (int) $row['sub']; $name .= ' ' . sp_array_value( sp_array_value( $data, $subbed, array() ), 'number', null ) . ''; - if ( $show_minutes && ! empty( $row['sub'] ) ): - preg_match( '#\((.*?)\)#', $row['sub'], $match ); - if ( ! empty( $match ) && isset( $match[1] ) ): - $name .= ' (' . $match[1] . ')'; - endif; - endif; endif; echo '' . $name . '';