From 30e8829f6216a34d46e96b3678f541e4fe884715 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 19 Oct 2014 23:26:25 +1100 Subject: [PATCH] Apply link teams option to player details --- templates/player-details.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/player-details.php b/templates/player-details.php index cf775c0e..c3120586 100644 --- a/templates/player-details.php +++ b/templates/player-details.php @@ -48,7 +48,9 @@ $data = array_merge( $metrics_before, $common, $metrics_after ); if ( $current_teams ): $teams = array(); foreach ( $current_teams as $team ): - $teams[] = '' . get_the_title( $team ) . ''; + $team_name = get_the_title( $team ); + if ( $link_teams ) $team_name = '' . $team_name . ''; + $teams[] = $team_name; endforeach; $label = _n( 'Current Team', 'Current Teams', count( $teams ), 'sportspress' ); $data[ $label ] = implode( ', ', $teams ); @@ -57,7 +59,9 @@ endif; if ( $past_teams ): $teams = array(); foreach ( $past_teams as $team ): - $teams[] = '' . get_the_title( $team ) . ''; + $team_name = get_the_title( $team ); + if ( $link_teams ) $team_name = '' . $team_name . ''; + $teams[] = $team_name; endforeach; $data[ __( 'Past Teams', 'sportspress' ) ] = implode( ', ', $teams ); endif;