Clean up spaces, tabs, indentation, and bracket formatting
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
/**
|
||||
* Player Statistics for Single League
|
||||
*
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Meta_Boxes
|
||||
* @author ThemeBoy
|
||||
* @category Admin
|
||||
* @package SportsPress/Admin/Meta_Boxes
|
||||
* @version 2.5
|
||||
*/
|
||||
|
||||
@@ -15,16 +15,18 @@ $labels = $data[0];
|
||||
unset( $data[0] );
|
||||
|
||||
// Skip if there are no rows in the table
|
||||
if ( empty( $data ) )
|
||||
if ( empty( $data ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$output = '<h4 class="sp-table-caption">' . $caption . '</h4>' .
|
||||
'<div class="sp-table-wrapper">' .
|
||||
'<table class="sp-player-statistics sp-data-table' . ( $scrollable ? ' sp-scrollable-table' : '' ) . '">' . '<thead>' . '<tr>';
|
||||
|
||||
foreach( $labels as $key => $label ):
|
||||
if ( isset( $hide_teams ) && 'team' == $key )
|
||||
foreach ( $labels as $key => $label ) :
|
||||
if ( isset( $hide_teams ) && 'team' == $key ) {
|
||||
continue;
|
||||
}
|
||||
$output .= '<th class="data-' . $key . '">' . $label . '</th>';
|
||||
endforeach;
|
||||
|
||||
@@ -32,13 +34,14 @@ $output .= '</tr>' . '</thead>' . '<tbody>';
|
||||
|
||||
$i = 0;
|
||||
|
||||
foreach( $data as $season_id => $row ):
|
||||
foreach ( $data as $season_id => $row ) :
|
||||
|
||||
$output .= '<tr class="' . ( $i % 2 == 0 ? 'odd' : 'even' ) . '">';
|
||||
|
||||
foreach( $labels as $key => $value ):
|
||||
if ( isset( $hide_teams ) && 'team' == $key )
|
||||
foreach ( $labels as $key => $value ) :
|
||||
if ( isset( $hide_teams ) && 'team' == $key ) {
|
||||
continue;
|
||||
}
|
||||
$output .= '<td class="data-' . $key . ( -1 === $season_id ? ' sp-highlight' : '' ) . '">' . sp_array_value( $row, $key, '' ) . '</td>';
|
||||
endforeach;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user