Remove mode setting and unused thumbnail sizes

This commit is contained in:
Brian Miyaji
2014-08-14 18:54:55 +10:00
parent 64fab4eb2d
commit 4fe9525a8a
19 changed files with 137 additions and 234 deletions

View File

@@ -59,11 +59,6 @@ class SP_Admin_Assets {
wp_enqueue_style( 'sportspress-admin-equation-styles', SP()->plugin_url() . '/assets/css/equation.css', array(), SP_VERSION );
}
if ( SP()->mode == 'player' ):
$custom_css = '#adminmenu #menu-posts-sp_team .menu-icon-sp_team div.wp-menu-image:before,.sp-icon-shield:before{content: "\f307"}';
wp_add_inline_style( 'sportspress-admin-menu-styles', $custom_css );
endif;
do_action( 'sportspress_admin_css' );
}

View File

@@ -34,11 +34,8 @@ class SP_Admin_Settings {
$settings[] = include( 'settings/class-sp-settings-general.php' );
$settings[] = include( 'settings/class-sp-settings-events.php' );
$settings[] = include( 'settings/class-sp-settings-teams.php' );
if ( SP()->mode == 'team' ):
$settings[] = include( 'settings/class-sp-settings-players.php' );
$settings[] = include( 'settings/class-sp-settings-staff.php' );
endif;
$settings = apply_filters( 'sportspress_get_settings_pages', $settings );

View File

@@ -181,10 +181,6 @@ class SP_Admin_Welcome {
// Save settings
if ( isset( $_POST['timezone_string'] ) ):
update_option( 'timezone_string', $_POST['timezone_string'] );
endif;
if ( isset( $_POST['sportspress_mode'] ) && ! empty( $_POST['sportspress_mode'] ) && get_option( 'sportspress_mode', null ) != $_POST['sportspress_mode'] ):
$sport = $_POST['sportspress_mode'];
update_option( 'sportspress_mode', $_POST['sportspress_mode'] );
endif;
if ( isset( $_POST['sportspress_sport'] ) && ! empty( $_POST['sportspress_sport'] ) && get_option( 'sportspress_sport', null ) != $_POST['sportspress_sport'] ):
$sport = $_POST['sportspress_sport'];
@@ -235,20 +231,6 @@ class SP_Admin_Welcome {
));
SP_Admin_Settings::output_fields( $settings );
?>
<h4><?php _e( 'Mode', 'sportspress' ); ?></h4>
<?php
$settings = array( array(
'id' => 'sportspress_mode',
'default' => 'team',
'type' => 'select',
'class' => $class,
'options' => array(
'team' => _x( 'Team', 'mode select', 'sportspress' ),
'player' => _x( 'Individual', 'mode select', 'sportspress' ),
),
));
SP_Admin_Settings::output_fields( $settings );
?>
<p class="submit sportspress-actions">
<input name="save" class="button-primary" type="submit" value="<?php _e( 'Save changes', 'sportspress' ); ?>" />
<input type="hidden" name="subtab" id="last_tab" />

View File

@@ -52,7 +52,7 @@ class SP_Admin_Meta_Boxes {
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Teams::save', 30, 2 );
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Video::save', 40, 2 );
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Results::save', 50, 2 );
if ( SP()->mode == 'team' ) add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Performance::save', 60, 2 );
add_action( 'sportspress_process_sp_event_meta', 'SP_Meta_Box_Event_Performance::save', 60, 2 );
// Save Calendar Meta Boxes
add_action( 'sportspress_process_sp_calendar_meta', 'SP_Meta_Box_Calendar_Format::save', 10, 2 );
@@ -62,7 +62,7 @@ class SP_Admin_Meta_Boxes {
// Save Team Meta Boxes
add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Details::save', 10, 2 );
add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Columns::save', 20, 2 );
if ( SP()->mode == 'team' ) add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Lists::save', 30, 2 );
add_action( 'sportspress_process_sp_team_meta', 'SP_Meta_Box_Team_Lists::save', 30, 2 );
// Save Table Meta Boxes
add_action( 'sportspress_process_sp_table_meta', 'SP_Meta_Box_Table_Details::save', 10, 2 );
@@ -124,7 +124,7 @@ class SP_Admin_Meta_Boxes {
add_meta_box( 'sp_videodiv', __( 'Video', 'sportspress' ), 'SP_Meta_Box_Event_Video::output', 'sp_event', 'side', 'low' );
if ( sizeof( array_filter( sp_array_value( $post_meta, 'sp_team', array() ) ) ) ):
add_meta_box( 'sp_resultsdiv', __( 'Team Results', 'sportspress' ), 'SP_Meta_Box_Event_Results::output', 'sp_event', 'normal', 'high' );
if ( SP()->mode == 'team' ) add_meta_box( 'sp_performancediv', __( 'Player Performance', 'sportspress' ), 'SP_Meta_Box_Event_Performance::output', 'sp_event', 'normal', 'high' );
add_meta_box( 'sp_performancediv', __( 'Player Performance', 'sportspress' ), 'SP_Meta_Box_Event_Performance::output', 'sp_event', 'normal', 'high' );
endif;
add_meta_box( 'sp_editordiv', __( 'Article', 'sportspress' ), 'SP_Meta_Box_Event_Editor::output', 'sp_event', 'normal', 'low' );
@@ -139,7 +139,7 @@ class SP_Admin_Meta_Boxes {
add_meta_box( 'sp_detailsdiv', __( 'Details', 'sportspress' ), 'SP_Meta_Box_Team_Details::output', 'sp_team', 'side', 'default' );
if ( isset( $post ) && isset( $post->ID ) ):
if ( get_the_terms( $post->ID, 'sp_league' ) && get_the_terms( $post->ID, 'sp_season' ) ) add_meta_box( 'sp_columnssdiv', __( 'Table Columns', 'sportspress' ), 'SP_Meta_Box_Team_Columns::output', 'sp_team', 'normal', 'high' );
if ( SP()->mode == 'team' ) add_meta_box( 'sp_listsdiv', __( 'Player Lists', 'sportspress' ), 'SP_Meta_Box_Team_Lists::output', 'sp_team', 'normal', 'high' );
add_meta_box( 'sp_listsdiv', __( 'Player Lists', 'sportspress' ), 'SP_Meta_Box_Team_Lists::output', 'sp_team', 'normal', 'high' );
endif;
add_meta_box( 'sp_editordiv', __( 'Profile', 'sportspress' ), 'SP_Meta_Box_Team_Editor::output', 'sp_team', 'normal', 'low' );

View File

@@ -37,9 +37,6 @@ class SP_Meta_Box_Event_Teams {
wp_dropdown_pages( $args );
?>
</p>
<?php
if ( SP()->mode == 'team' ):
?>
<ul id="sp_team-tabs" class="wp-tab-bar sp-tab-bar">
<li class="wp-tab-active"><a href="#sp_player-all"><?php _e( 'Players', 'sportspress' ); ?></a></li>
<li class="wp-tab"><a href="#sp_staff-all"><?php _e( 'Staff', 'sportspress' ); ?></a></li>
@@ -47,7 +44,6 @@ class SP_Meta_Box_Event_Teams {
<?php
sp_post_checklist( $post->ID, 'sp_player', 'block', 'sp_current_team', $i );
sp_post_checklist( $post->ID, 'sp_staff', 'none', 'sp_current_team', $i );
endif;
?>
</div>
<?php

View File

@@ -53,17 +53,6 @@ class SP_Settings_General extends SP_Settings_Page {
'options' => $presets,
),
array(
'title' => __( 'Mode', 'sportspress' ),
'id' => 'sportspress_mode',
'default' => 'team',
'type' => 'select',
'options' => array(
'team' => _x( 'Team', 'mode select', 'sportspress' ),
'player' => _x( 'Individual', 'mode select', 'sportspress' ),
),
),
array(
'title' => __( 'Google Maps', 'sportspress' ),
'id' => 'sportspress_map_type',
@@ -141,6 +130,15 @@ class SP_Settings_General extends SP_Settings_Page {
'desc_tip' => __( 'This will enable a script allowing the tables to be sortable.', 'sportspress' ),
),
array(
'desc' => __( 'Scrollable tables', 'sportspress' ),
'id' => 'sportspress_enable_scrollable_tables',
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => '',
'desc_tip' => __( 'This will enable a script allowing the tables to be scrollable.', 'sportspress' ),
),
array(
'desc' => __( 'Live countdowns', 'sportspress' ),
'id' => 'sportspress_enable_live_countdowns',

View File

@@ -57,19 +57,15 @@ class SP_Settings_Players extends SP_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
),
);
if ( SP()->mode == 'team' ):
$settings[] = array(
array(
'title' => __( 'Teams', 'sportspress' ),
'desc' => __( 'Link teams', 'sportspress' ),
'id' => 'sportspress_list_link_teams',
'default' => 'no',
'type' => 'checkbox',
);
endif;
),
$settings = array_merge( $settings, array(
array(
'title' => __( 'Pagination', 'sportspress' ),
'desc' => __( 'Paginate', 'sportspress' ),
@@ -92,7 +88,7 @@ class SP_Settings_Players extends SP_Settings_Page {
),
array( 'type' => 'sectionend', 'id' => 'list_options' ),
)); // End player settings
); // End player settings
return apply_filters( 'sportspress_player_settings', $settings );
}

View File

@@ -456,7 +456,6 @@ class SP_Post_types {
)
);
if ( SP()->mode == 'team' ):
register_post_type( 'sp_player',
apply_filters( 'sportspress_register_post_type_player',
array(
@@ -548,7 +547,6 @@ class SP_Post_types {
)
)
);
endif;
}
public function display_scheduled_events( $posts ) {

View File

@@ -1066,19 +1066,25 @@ if ( !function_exists( 'sp_get_next_event' ) ) {
function sp_get_text_options() {
$strings = apply_filters( 'sportspress_text', array(
__( 'Article', 'sportspress' ),
__( 'Current Team', 'sportspress' ),
__( 'Date', 'sportspress' ),
__( 'Details', 'sportspress' ),
__( 'Event', 'sportspress' ),
__( 'League', 'sportspress' ),
__( 'Nationality', 'sportspress' ),
__( 'Outcome', 'sportspress' ),
__( 'Past Teams', 'sportspress' ),
__( 'Played', 'sportspress' ),
__( 'Player', 'sportspress' ),
__( 'Pos', 'sportspress' ),
__( 'Position', 'sportspress' ),
__( 'Preview', 'sportspress' ),
__( 'Rank', 'sportspress' ),
__( 'Recap', 'sportspress' ),
__( 'Team Results', 'sportspress' ),
__( 'Season', 'sportspress' ),
__( 'Staff', 'sportspress' ),
__( 'Substitutes', 'sportspress' ),
__( 'Team', 'sportspress' ),
__( 'Teams', 'sportspress' ),
__( 'Time', 'sportspress' ),
@@ -1086,21 +1092,10 @@ function sp_get_text_options() {
__( 'Total', 'sportspress' ),
__( 'Venue', 'sportspress' ),
__( 'View all events', 'sportspress' ),
__( 'View all players', 'sportspress' ),
__( 'View full table', 'sportspress' ),
));
if ( SP()->mode == 'team' ):
$strings = array_merge( $strings, array(
__( 'Current Team', 'sportspress' ),
__( 'Past Teams', 'sportspress' ),
__( 'Player', 'sportspress' ),
__( 'Position', 'sportspress' ),
__( 'Staff', 'sportspress' ),
__( 'Substitutes', 'sportspress' ),
__( 'View all players', 'sportspress' ),
));
endif;
asort( $strings );
return $strings;
}

View File

@@ -133,7 +133,7 @@ if ( ! function_exists( 'sportspress_output_event_performance' ) ) {
* @return void
*/
function sportspress_output_event_performance() {
if ( SP()->mode == 'team' ) sp_get_template( 'event-performance.php' );
sp_get_template( 'event-performance.php' );
}
}

View File

@@ -56,11 +56,6 @@ final class SportsPress {
*/
public $text = array();
/**
* @var string
*/
public $mode = 'team';
/**
* Main SportsPress Instance
*
@@ -121,7 +116,6 @@ final class SportsPress {
add_action( 'init', array( $this, 'init' ), 0 );
add_action( 'init', array( 'SP_Shortcodes', 'init' ) );
add_action( 'after_setup_theme', array( $this, 'setup_environment' ) );
add_filter( 'gettext', array( $this, 'gettext' ), 20, 3 );
// Loaded action
do_action( 'sportspress_loaded' );
@@ -279,9 +273,6 @@ final class SportsPress {
// Load string options
$this->text = get_option( 'sportspress_text', array() );
// Get mode option
$this->mode = sp_get_option( 'sportspress_mode', 'team' );
// Init action
do_action( 'sportspress_init' );
}
@@ -305,64 +296,12 @@ final class SportsPress {
public function setup_environment() {
add_theme_support( 'post-thumbnails' );
// Standard (3:2)
add_image_size( 'sportspress-standard', 640, 480, true );
add_image_size( 'sportspress-standard-thumbnail', 320, 240, true );
// Wide (16:9)
add_image_size( 'sportspress-wide-header', 1920, 1080, true );
add_image_size( 'sportspress-wide', 640, 360, true );
add_image_size( 'sportspress-wide-thumbnail', 320, 180, true );
// Square (1:1)
add_image_size( 'sportspress-square', 640, 640, true );
add_image_size( 'sportspress-square-thumbnail', 320, 320, true );
// Fit (Proportional)
add_image_size( 'sportspress-fit', 640, 640, false );
// Add image sizes
add_image_size( 'sportspress-fit-thumbnail', 320, 320, false );
add_image_size( 'sportspress-fit-icon', 128, 128, false );
add_image_size( 'sportspress-fit-mini', 32, 32, false );
}
/**
* Replace team strings with player if individual mode.
*/
public function gettext( $translated_text, $untranslated_text, $domain = 'default' ) {
if ( SP()->mode == 'player' && $domain == 'sportspress' ):
switch ( $untranslated_text ):
case 'Teams':
return __( 'Players', 'sportspress' );
case 'Team':
return __( 'Player', 'sportspress' );
case 'teams':
return __( 'players', 'sportspress' );
case 'Add New Team':
return __( 'Add New Player', 'sportspress' );
case 'Edit Team':
return __( 'Edit Player', 'sportspress' );
case 'Team Options':
return __( 'Player Options', 'sportspress' );
case 'Team Results':
return __( 'Player Performance', 'sportspress' );
case 'Logo':
return __( 'Photo', 'sportspress' );
case 'Add logo':
return __( 'Add photo', 'sportspress' );
case 'Remove logo':
return __( 'Remove photo', 'sportspress' );
case 'Select Logo':
return __( 'Select Photo', 'sportspress' );
case 'Display logos':
return __( 'Display photos', 'sportspress' );
case 'Link teams':
return __( 'Link players', 'sportspress' );
endswitch;
endif;
return $translated_text;
}
/** Helper functions ******************************************************/
/**

View File

@@ -12,6 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! isset( $id ) )
$id = get_the_ID();
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$date = get_the_time( get_option('date_format'), $id );
$time = get_the_time( get_option('time_format'), $id );
$leagues = get_the_terms( $id, 'sp_league' );
@@ -30,7 +31,7 @@ if ( $seasons ):
endif;
?>
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>
<div class="sp-table-wrapper sp-scrollable-table-wrapper">
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
<table class="sp-event-details sp-data-table">
<thead>
<tr>

View File

@@ -19,6 +19,7 @@ $defaults = array(
'link_teams' => get_option( 'sportspress_calendar_link_teams', 'no' ) == 'yes' ? true : false,
'link_venues' => get_option( 'sportspress_calendar_link_venues', 'yes' ) == 'yes' ? true : false,
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_calendar_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_calendar_rows', 10 ),
@@ -46,7 +47,7 @@ if ( isset( $columns ) ):
$usecolumns = explode( ',', $columns );
endif;
?>
<div class="sp-table-wrapper sp-scrollable-table-wrapper">
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
<table class="sp-event-list sp-data-table<?php if ( $responsive ) { ?> sp-responsive-table<?php } if ( $paginated ) { ?> sp-paginated-table<?php } ?>" data-sp-rows="<?php echo $rows; ?>">
<thead>
<tr>

View File

@@ -29,6 +29,7 @@ $status = $event->status();
$show_players = get_option( 'sportspress_event_show_players', 'yes' ) == 'yes' ? true : false;
$link_posts = get_option( 'sportspress_event_link_players', 'yes' ) == 'yes' ? true : false;
$sortable = get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false;
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
if ( is_array( $teams ) ):
@@ -55,7 +56,7 @@ if ( is_array( $teams ) ):
sp_get_template( 'event-staff.php', array( 'id' => $id, 'index' => $index ) );
endif;
?>
<div class="sp-table-wrapper sp-scrollable-table-wrapper">
<div class="sp-table-wrapper<?php if ( $scrollable ) { ?> sp-scrollable-table-wrapper<?php } ?>">
<table class="sp-event-performance sp-data-table <?php if ( $responsive ) { ?> sp-responsive-table<?php } if ( $has_players && $sortable ) { ?> sp-sortable-table<?php } ?>">
<thead>
<tr>

View File

@@ -31,6 +31,7 @@ $data = array_filter( $data );
if ( empty( $data ) )
return false;
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$show_outcomes = array_key_exists( 'outcome', $labels );
// Initialize
@@ -88,7 +89,7 @@ else:
$output .= '<h4 class="sp-table-caption">' . __( 'Team Results', 'sportspress' ) . '</h4>';
$output .= '<div class="sp-table-wrapper sp-scrollable-table-wrapper">' .
$output .= '<div class="sp-table-wrapper' . ( $scrollable ? ' sp-scrollable-table-wrapper' : '' ) . '">' .
'<table class="sp-event-results sp-data-table sp-responsive-table"><thead>' .
'<th class="data-name">' . __( 'Team', 'sportspress' ) . '</th>';
foreach( $labels as $key => $label ):

View File

@@ -17,6 +17,7 @@ $defaults = array(
'show_team_logo' => get_option( 'sportspress_table_show_logos', 'yes' ) == 'yes' ? true : false,
'link_posts' => get_option( 'sportspress_table_link_teams', 'no' ) == 'yes' ? true : false,
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_table_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_table_rows', 10 ),
@@ -26,7 +27,7 @@ extract( $defaults, EXTR_SKIP );
$output = '<h4 class="sp-table-caption">' . get_the_title( $id ) . '</h4>';
$output .= '<div class="sp-table-wrapper sp-scrollable-table-wrapper">';
$output .= '<div class="sp-table-wrapper' . ( $scrollable ? ' sp-scrollable-table-wrapper' : '' ) . '">';
$output .= '<table class="sp-league-table sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $sortable ? ' sp-sortable-table' : '' ) . ( $paginated ? ' sp-paginated-table' : '' ) . '" data-sp-rows="' . $rows . '">' . '<thead>' . '<tr>';

View File

@@ -21,6 +21,7 @@ $defaults = array(
'link_posts' => get_option( 'sportspress_list_link_players', 'yes' ) == 'yes' ? true : false,
'link_teams' => get_option( 'sportspress_list_link_teams', 'no' ) == 'yes' ? true : false,
'sortable' => get_option( 'sportspress_enable_sortable_tables', 'yes' ) == 'yes' ? true : false,
'scrollable' => get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false,
'responsive' => get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false,
'paginated' => get_option( 'sportspress_list_paginated', 'yes' ) == 'yes' ? true : false,
'rows' => get_option( 'sportspress_list_rows', 10 ),
@@ -79,7 +80,7 @@ foreach ( $groups as $group ):
$output .= '<' . $grouptag . ' class="sp-table-caption player-group-name player-list-group-name">' . $group->name . '</' . $grouptag . '>';
endif;
$output .= '<div class="sp-table-wrapper sp-scrollable-table-wrapper">' .
$output .= '<div class="sp-table-wrapper' . ( $scrollable ? ' sp-scrollable-table-wrapper' : '' ) . '">' .
'<table class="sp-player-list sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . ( $sortable ? ' sp-sortable-table' : '' ) . ( $paginated ? ' sp-paginated-table' : '' ) . '" data-sp-rows="' . $rows . '">' . '<thead>' . '<tr>';
if ( in_array( $orderby, array( 'number', 'name' ) ) ):

View File

@@ -14,13 +14,13 @@ 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;
$leagues = get_the_terms( $id, 'sp_league' );
// Loop through statistics for each league
if ( is_array( $leagues ) ):
foreach ( $leagues as $league ):
$responsive = get_option( 'sportspress_enable_responsive_tables', 'yes' ) == 'yes' ? true : false;
$data = $player->data( $league->term_id );
// The first row should be column labels
@@ -34,7 +34,7 @@ if ( is_array( $leagues ) ):
return false;
$output = '<h4 class="sp-table-caption">' . $league->name . '</h4>' .
'<div class="sp-table-wrapper sp-scrollable-table-wrapper">' .
'<div class="sp-table-wrapper' . ( $scrollable ? ' sp-scrollable-table-wrapper' : '' ) . '">' .
'<table class="sp-player-statistics sp-data-table' . ( $responsive ? ' sp-responsive-table' : '' ) . '">' . '<thead>' . '<tr>';
foreach( $labels as $key => $label ):

View File

@@ -12,6 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
if ( ! isset( $id ) )
$id = get_the_ID();
$scrollable = get_option( 'sportspress_enable_scrollable_tables', 'yes' ) == 'yes' ? true : false;
$leagues = get_the_terms( $id, 'sp_league' );
if ( ! $leagues )
@@ -36,7 +37,7 @@ foreach ( $leagues as $league ):
unset( $data[0] );
$output .= '<h4 class="sp-table-caption">' . $league->name . '</h4>' .
'<div class="sp-table-wrapper sp-scrollable-table-wrapper">' .
'<div class="sp-table-wrapper' . ( $scrollable ? ' sp-scrollable-table-wrapper' : '' ) . '">' .
'<table class="sp-team-columns sp-data-table sp-responsive-table">' . '<thead>' . '<tr>';
foreach( $labels as $key => $label ):