Display career totals if available

This commit is contained in:
Brian Miyaji
2015-03-28 11:27:35 +11:00
parent f99097f006
commit 2ef8ff584a

View File

@@ -16,7 +16,6 @@ if ( ! isset( $id ) )
$player = new SP_Player( $id ); $player = new SP_Player( $id );
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false; $scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$show_total = get_option( 'sportspress_player_show_total', 'no' ) == 'yes' ? true : false;
$leagues = get_the_terms( $id, 'sp_league' ); $leagues = get_the_terms( $id, 'sp_league' );
// Loop through statistics for each league // Loop through statistics for each league
@@ -69,7 +68,7 @@ if ( is_array( $leagues ) ):
endforeach; endforeach;
endif; endif;
if ( $show_total ): // Career total
$data = $player->data( 0 ); $data = $player->data( 0 );
// The first row should be column labels // The first row should be column labels
@@ -117,5 +116,3 @@ if ( $show_total ):
<div class="sp-template sp-template-player-statistics sp-template-player-total"> <div class="sp-template sp-template-player-statistics sp-template-player-total">
<?php echo $output; ?> <?php echo $output; ?>
</div> </div>
<?php
endif;