SportsPress – Sports Club & League Manager - Version 2.6.12

Version Description

  • Tweak - Match styling of date row in countdown.
  • Fix - Calculated totals in player performance array missing for custom templates.
  • Fix - Date field hidden from existing calendars.
Download this release

Release Info

Developer brianmiyaji
Plugin Icon 128x128 SportsPress – Sports Club & League Manager
Version 2.6.12
Comparing to
See all releases

Code changes from version 2.6.11 to 2.6.12

changelog.txt CHANGED
@@ -1,5 +1,18 @@
1
  == SportsPress Changelog ==
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  = 2.6.10 =
4
  * Tweak - Apply reverse teams settings to logos.
5
  * Fix - Statistics doubling in player lists when player is assigned to a team.
1
  == SportsPress Changelog ==
2
 
3
+ = 2.6.12 =
4
+ * Tweak - Match styling of date row in countdown.
5
+ * Fix - Calculated totals in player performance array missing for custom templates.
6
+ * Fix - Date field hidden from existing calendars.
7
+
8
+ = 2.6.11 =
9
+ * Tweak - Apply reverse teams setting to event blocks.
10
+ * Tweak - Add zero before days in countdown when there are less than 10 days to go.
11
+ * Fix - Venue address not setting correctly.
12
+ * Fix - RTL language support for first column in tables.
13
+ * Fix - PHP warnings for various static functions.
14
+ * Fix - Custom post types displaying blank screen in admin when Gutenberg is active.
15
+
16
  = 2.6.10 =
17
  * Tweak - Apply reverse teams settings to logos.
18
  * Fix - Statistics doubling in player lists when player is assigned to a team.
includes/admin/post-types/meta-boxes/class-sp-meta-box-calendar-columns.php CHANGED
@@ -5,7 +5,7 @@
5
  * @author ThemeBoy
6
  * @category Admin
7
  * @package SportsPress/Admin/Meta_Boxes
8
- * @version 2.6.11
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -28,8 +28,6 @@ class SP_Meta_Box_Calendar_Columns {
28
  }
29
 
30
  $columns = array();
31
-
32
- $columns['date'] = __( 'Date', 'sportspress' );
33
 
34
  if ( 'teams' === $title_format ) {
35
  $columns[ 'event' ] = __( 'Home', 'sportspress' ) . ' | ' . __( 'Away', 'sportspress' );
5
  * @author ThemeBoy
6
  * @category Admin
7
  * @package SportsPress/Admin/Meta_Boxes
8
+ * @version 2.6.12
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
28
  }
29
 
30
  $columns = array();
 
 
31
 
32
  if ( 'teams' === $title_format ) {
33
  $columns[ 'event' ] = __( 'Home', 'sportspress' ) . ' | ' . __( 'Away', 'sportspress' );
includes/class-sp-ajax.php CHANGED
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
8
  * AJAX Event Handler
9
  *
10
  * @class SP_AJAX
11
- * @version 2.6.11
12
  * @package SportsPress/Classes
13
  * @category Class
14
  * @author ThemeBoy
@@ -621,7 +621,6 @@ class SP_AJAX {
621
  <?php _e( 'Columns:', 'sportspress' ); ?><br>
622
  <?php
623
  $the_columns = array(
624
- 'date' => __( 'Date', 'sportspress' ),
625
  'event' => __( 'Event', 'sportspress' ),
626
  'teams' => __( 'Teams', 'sportspress' ),
627
  'time' => __( 'Time', 'sportspress' ),
8
  * AJAX Event Handler
9
  *
10
  * @class SP_AJAX
11
+ * @version 2.6.12
12
  * @package SportsPress/Classes
13
  * @category Class
14
  * @author ThemeBoy
621
  <?php _e( 'Columns:', 'sportspress' ); ?><br>
622
  <?php
623
  $the_columns = array(
 
624
  'event' => __( 'Event', 'sportspress' ),
625
  'teams' => __( 'Teams', 'sportspress' ),
626
  'time' => __( 'Time', 'sportspress' ),
includes/class-sp-event.php CHANGED
@@ -5,7 +5,7 @@
5
  * The SportsPress event class handles individual event data.
6
  *
7
  * @class SP_Event
8
- * @version 2.6.11
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
@@ -184,7 +184,7 @@ class SP_Event extends SP_Custom_Post{
184
  if ( ! is_array( $players ) ) continue;
185
 
186
  foreach ( $players as $player => $player_performance ):
187
- if ( ! is_array( $player_performance ) || ! $player ) continue;
188
 
189
  // Prepare existing values for equation calculation
190
  $vars = $player_performance;
5
  * The SportsPress event class handles individual event data.
6
  *
7
  * @class SP_Event
8
+ * @version 2.6.12
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
184
  if ( ! is_array( $players ) ) continue;
185
 
186
  foreach ( $players as $player => $player_performance ):
187
+ if ( ! is_array( $player_performance ) ) continue;
188
 
189
  // Prepare existing values for equation calculation
190
  $vars = $player_performance;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: calendars, club, club management, esports, events, fixtures, leagues, leag
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 5.0
7
- Stable tag: 2.6.11
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -237,6 +237,11 @@ When you upgrade to one of the SportsPress Pro licenses, you can simply activate
237
 
238
  == Changelog ==
239
 
 
 
 
 
 
240
  = 2.6.11 =
241
  * Tweak - Apply reverse teams setting to event blocks.
242
  * Tweak - Add zero before days in countdown when there are less than 10 days to go.
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 5.0
7
+ Stable tag: 2.6.12
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
237
 
238
  == Changelog ==
239
 
240
+ = 2.6.12 =
241
+ * Tweak - Match styling of date row in countdown.
242
+ * Fix - Calculated totals in player performance array missing for custom templates.
243
+ * Fix - Date field hidden from existing calendars.
244
+
245
  = 2.6.11 =
246
  * Tweak - Apply reverse teams setting to event blocks.
247
  * Tweak - Add zero before days in countdown when there are less than 10 days to go.
sportspress.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: SportsPress
4
  * Plugin URI: http://themeboy.com/sportspress/
5
  * Description: Manage your club and its players, staff, events, league tables, and player lists.
6
- * Version: 2.6.11
7
  * Author: ThemeBoy
8
  * Author URI: http://themeboy.com
9
  * Requires at least: 3.8
@@ -26,14 +26,14 @@ if ( ! class_exists( 'SportsPress' ) ) :
26
  * Main SportsPress Class
27
  *
28
  * @class SportsPress
29
- * @version 2.6.11
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
- public $version = '2.6.11';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class
3
  * Plugin Name: SportsPress
4
  * Plugin URI: http://themeboy.com/sportspress/
5
  * Description: Manage your club and its players, staff, events, league tables, and player lists.
6
+ * Version: 2.6.12
7
  * Author: ThemeBoy
8
  * Author URI: http://themeboy.com
9
  * Requires at least: 3.8
26
  * Main SportsPress Class
27
  *
28
  * @class SportsPress
29
+ * @version 2.6.12
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
+ public $version = '2.6.12';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class
templates/countdown.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6.11
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -108,7 +108,7 @@ if ( $link_events ) $title = '<a href="' . get_post_permalink( $post->ID, false,
108
  <?php
109
  if ( isset( $show_date ) && $show_date ):
110
  ?>
111
- <h5 class="event-date sp-event-date">
112
  <?php
113
  echo get_the_time( get_option( 'date_format' ), $post );
114
  ?>
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.12
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
108
  <?php
109
  if ( isset( $show_date ) && $show_date ):
110
  ?>
111
+ <h5 class="event-venue sp-event-venue event-date sp-event-date">
112
  <?php
113
  echo get_the_time( get_option( 'date_format' ), $post );
114
  ?>
templates/event-list.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6.11
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -113,9 +113,7 @@ $identifier = uniqid( 'eventlist_' );
113
  <thead>
114
  <tr>
115
  <?php
116
- if ( sp_column_active( $usecolumns, 'date' ) ) {
117
- echo '<th class="data-date">' . __( 'Date', 'sportspress' ) . '</th>';
118
- }
119
 
120
  switch ( $title_format ) {
121
  case 'homeaway':
@@ -258,9 +256,7 @@ $identifier = uniqid( 'eventlist_' );
258
 
259
  if ( $link_events ) $date_html = '<a href="' . get_post_permalink( $event->ID, false, true ) . '" itemprop="url">' . $date_html . '</a>';
260
 
261
- if ( sp_column_active( $usecolumns, 'date' ) ) {
262
- echo '<td class="data-date" itemprop="startDate" content="' . mysql2date( 'Y-m-d\TH:iP', $event->post_date ) . '" data-label="'.__( 'Date', 'sportspress' ).'">' . $date_html . '</td>';
263
- }
264
 
265
  switch ( $title_format ) {
266
  case 'homeaway':
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.12
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
113
  <thead>
114
  <tr>
115
  <?php
116
+ echo '<th class="data-date">' . __( 'Date', 'sportspress' ) . '</th>';
 
 
117
 
118
  switch ( $title_format ) {
119
  case 'homeaway':
256
 
257
  if ( $link_events ) $date_html = '<a href="' . get_post_permalink( $event->ID, false, true ) . '" itemprop="url">' . $date_html . '</a>';
258
 
259
+ echo '<td class="data-date" itemprop="startDate" content="' . mysql2date( 'Y-m-d\TH:iP', $event->post_date ) . '" data-label="'.__( 'Date', 'sportspress' ).'">' . $date_html . '</td>';
 
 
260
 
261
  switch ( $title_format ) {
262
  case 'homeaway':
templates/event-performance-table.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6.11
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -236,6 +236,7 @@ $i = 0;
236
  if ( $mode == 'icons' ) echo '<td class="sp-performance-icons" colspan="2">';
237
 
238
  foreach ( $labels as $key => $label ):
 
239
  if ( 'name' == $key )
240
  continue;
241
  if ( $key == 'position' ):
@@ -243,7 +244,7 @@ $i = 0;
243
  else:
244
  if ( $primary && $key !== $primary ):
245
  $value = '&nbsp;';
246
- elseif ( array_key_exists( $key, $row ) && $row[ $key ] != '' ):
247
  $value = $row[ $key ];
248
  else:
249
  $value = apply_filters( 'sportspress_event_performance_table_total_value', sp_array_value( $totals, $key, 0 ), $data, $key );
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.12
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
236
  if ( $mode == 'icons' ) echo '<td class="sp-performance-icons" colspan="2">';
237
 
238
  foreach ( $labels as $key => $label ):
239
+ $format = sp_array_value( $formats, $key, 'number' );
240
  if ( 'name' == $key )
241
  continue;
242
  if ( $key == 'position' ):
244
  else:
245
  if ( $primary && $key !== $primary ):
246
  $value = '&nbsp;';
247
+ elseif ( 'equation' !== $format && array_key_exists( $key, $row ) && $row[ $key ] != '' ):
248
  $value = $row[ $key ];
249
  else:
250
  $value = apply_filters( 'sportspress_event_performance_table_total_value', sp_array_value( $totals, $key, 0 ), $data, $key );