Merge scrollable and responsive settings

This commit is contained in:
Brian Miyaji
2015-01-30 18:36:31 +11:00
parent 592c754a1f
commit e40f6e9026
15 changed files with 16 additions and 162 deletions

View File

@@ -15,7 +15,6 @@ if ( ! isset( $id ) )
$player = new SP_Player( $id );
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
$show_total = get_option( 'sportspress_player_show_total', 'no' ) == 'yes' ? true : false;
$leagues = get_the_terms( $id, 'sp_league' );
@@ -36,7 +35,7 @@ if ( is_array( $leagues ) ):
$output = '<h4 class="sp-table-caption">' . $league->name . '</h4>' .
'<div class="sp-table-wrapper">' .
'<table class="sp-player-statistics sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $scrollable ? ' sp-scrollable-table' : '' ) . '">' . '<thead>' . '<tr>';
'<table class="sp-player-statistics sp-data-table' . ( $scrollable ? ' sp-scrollable-table' : '' ) . '">' . '<thead>' . '<tr>';
foreach( $labels as $key => $label ):
$output .= '<th class="data-' . $key . '">' . $label . '</th>';
@@ -84,7 +83,7 @@ if ( $show_total ):
$output = '<h4 class="sp-table-caption">' . __( 'Career Total', 'sportspress' ) . '</h4>' .
'<div class="sp-table-wrapper">' .
'<table class="sp-player-statistics sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $scrollable ? ' sp-scrollable-table' : '' ) . '">' . '<thead>' . '<tr>';
'<table class="sp-player-statistics sp-data-table' . ( $scrollable ? ' sp-scrollable-table' : '' ) . '">' . '<thead>' . '<tr>';
foreach( $labels as $key => $label ):
if ( 'team' == $key )