From c4f8f92745bf667c71f634751166a4a61934cc5a Mon Sep 17 00:00:00 2001 From: Brian Miyaji Date: Thu, 30 Oct 2014 20:50:40 +1100 Subject: [PATCH] Fix away team players not displaying if home team empty --- templates/event-performance.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/templates/event-performance.php b/templates/event-performance.php index 9f20640b..30cb4838 100644 --- a/templates/event-performance.php +++ b/templates/event-performance.php @@ -4,7 +4,7 @@ * * @author ThemeBoy * @package SportsPress/Templates - * @version 1.4 + * @version 1.4.5 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -56,12 +56,13 @@ if ( is_array( $teams ) ): $players = sp_array_between( (array)get_post_meta( $id, 'sp_player', false ), 0, $index ); $has_players = sizeof( $players ) > 1; - $show_players = $show_players && $has_players; + $show_team_players = $show_players && $has_players; $totals = array(); $data = sp_array_combine( $players, sp_array_value( $performance, $team_id, array() ) ); + if ( ! $show_team_players && ! $show_staff && ! $show_total ) continue; ?>

@@ -70,12 +71,12 @@ if ( is_array( $teams ) ): sp_get_template( 'event-staff.php', array( 'id' => $id, 'index' => $index ) ); endif; ?> - +
- + @@ -86,7 +87,7 @@ if ( is_array( $teams ) ): - + - <> + <>  '; echo ''; endif; @@ -214,7 +215,7 @@ if ( is_array( $teams ) ): if ( $mode == 'icons' ) echo ''; ?> - > + >
#
' . __( 'Total', 'sportspress' ) . '