From f88adc3c3c9f1a6f68eb5f8eb8fc337b88c93793 Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Sun, 19 Oct 2014 17:33:36 +1100 Subject: [PATCH] Link teams in event results --- templates/event-results.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/templates/event-results.php b/templates/event-results.php index 45b552f5..190f5e00 100644 --- a/templates/event-results.php +++ b/templates/event-results.php @@ -32,6 +32,7 @@ if ( empty( $data ) ) return false; $scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false; +$link_teams = get_option( 'sportspress_link_teams', 'no' ) == 'yes' ? true : false; $show_outcomes = array_key_exists( 'outcome', $labels ); // Initialize @@ -59,7 +60,13 @@ foreach( $data as $team_id => $result ): $table_rows .= ''; - $table_rows .= '' . get_the_title( $team_id ) . ''; + $team_name = get_the_title( $team_id ); + + if ( $link_teams ): + $team_name = '' . $team_name . ''; + endif; + + $table_rows .= '' . $team_name . ''; foreach( $labels as $key => $label ): if ( in_array( $key, array( 'name', 'outcome' ) ) )