Prevent box score from being displayed when event is in the future
This commit is contained in:
@@ -49,6 +49,10 @@ if ( is_array( $teams ) ):
|
|||||||
|
|
||||||
$status = $event->status();
|
$status = $event->status();
|
||||||
|
|
||||||
|
if ( 'future' == $status ) {
|
||||||
|
$show_total = false;
|
||||||
|
}
|
||||||
|
|
||||||
// Get performance ids for icons
|
// Get performance ids for icons
|
||||||
if ( $mode == 'icons' ):
|
if ( $mode == 'icons' ):
|
||||||
$performance_ids = array();
|
$performance_ids = array();
|
||||||
@@ -201,7 +205,8 @@ if ( is_array( $teams ) ):
|
|||||||
}
|
}
|
||||||
|
|
||||||
sp_get_template( 'event-performance-table.php', array(
|
sp_get_template( 'event-performance-table.php', array(
|
||||||
'section' => $section_label,
|
'section' => $section_id,
|
||||||
|
'section_label' => $section_label,
|
||||||
'scrollable' => $scrollable,
|
'scrollable' => $scrollable,
|
||||||
'sortable' => $sortable,
|
'sortable' => $sortable,
|
||||||
'show_players' => $show_team_players,
|
'show_players' => $show_team_players,
|
||||||
@@ -216,7 +221,7 @@ if ( is_array( $teams ) ):
|
|||||||
'link_posts' => $link_posts,
|
'link_posts' => $link_posts,
|
||||||
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
'performance_ids' => isset( $performance_ids ) ? $performance_ids : null,
|
||||||
'primary' => 'primary' == $total ? $primary : null,
|
'primary' => 'primary' == $total ? $primary : null,
|
||||||
'class' => 'sp-template-event-performance-team-' . $index . '-section-' . $section_id,
|
'class' => 'sp-template-event-performance-team-' . $index . ' sp-template-event-performance-section-' . $section_id . ' sp-template-event-performance-team-' . $index . '-section-' . $section_id,
|
||||||
) );
|
) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user