Combine event performance table more elegantly

This commit is contained in:
Brian Miyaji
2015-09-18 11:15:37 +10:00
parent 62ddcf0ab0
commit fec6816ead
3 changed files with 187 additions and 129 deletions

View File

@@ -155,11 +155,11 @@ if ( ! isset( $class ) ) $class = null;
?>
</tbody>
<?php endif; ?>
<?php if ( $show_total ): ?>
<?php if ( apply_filters( 'sportspress_event_performance_show_footer', $show_total ) ): ?>
<<?php echo ( $show_players ? 'tfoot' : 'tbody' ); ?>>
<?php
do_action( 'sportspress_event_performance_table_footer', $data, $labels, $position, $performance_ids );
if ( ! $primary || sizeof( array_intersect_key( $totals, array_flip( (array) $primary ) ) ) ) {
if ( $show_total && ( ! $primary || sizeof( array_intersect_key( $totals, array_flip( (array) $primary ) ) ) ) ) {
?>
<tr class="sp-total-row <?php echo ( $i % 2 == 0 ? 'odd' : 'even' ); ?>">
<?php