Remove mode setting and unused thumbnail sizes
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 ):
|
||||
|
||||
@@ -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>';
|
||||
|
||||
|
||||
@@ -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' ) ) ):
|
||||
|
||||
@@ -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 ):
|
||||
|
||||
@@ -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 ):
|
||||
|
||||
Reference in New Issue
Block a user