SportsPress – Sports Club & League Manager - Version 2.6.16

Version Description

  • Tweak - Add support for updated baseball extension with partial innings.
  • Fix - Error displaying staff in events when offense and defense are separate tables.
Download this release

Release Info

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

Code changes from version 2.6.15 to 2.6.16

changelog.txt CHANGED
@@ -1,5 +1,9 @@
1
  == SportsPress Changelog ==
2
 
 
 
 
 
3
  = 2.6.15 =
4
  * Important - Using Google Maps will require a SportsPress Pro license after August 31, 2019.
5
  * Refactor - Fallback to OpenStreetMap for venue maps without SportsPress Pro.
1
  == SportsPress Changelog ==
2
 
3
+ = 2.6.16 =
4
+ * Tweak - Add support for updated baseball extension with partial innings.
5
+ * Fix - Error displaying staff in events when offense and defense are separate tables.
6
+
7
  = 2.6.15 =
8
  * Important - Using Google Maps will require a SportsPress Pro license after August 31, 2019.
9
  * Refactor - Fallback to OpenStreetMap for venue maps without SportsPress Pro.
includes/admin/post-types/meta-boxes/class-sp-meta-box-performance-details.php CHANGED
@@ -5,7 +5,7 @@
5
  * @author ThemeBoy
6
  * @category Admin
7
  * @package SportsPress/Admin/Meta_Boxes
8
- * @version 2.3
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -157,6 +157,8 @@ class SP_Meta_Box_Performance_Details extends SP_Meta_Box_Config {
157
  </ul>
158
  <?php
159
  }
 
 
160
  }
161
 
162
  /**
5
  * @author ThemeBoy
6
  * @category Admin
7
  * @package SportsPress/Admin/Meta_Boxes
8
+ * @version 2.6.16
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
157
  </ul>
158
  <?php
159
  }
160
+
161
+ do_action( 'sportspress_meta_box_performance_details', $post );
162
  }
163
 
164
  /**
includes/class-sp-player-list.php CHANGED
@@ -5,7 +5,7 @@
5
  * The SportsPress player list class handles individual player list data.
6
  *
7
  * @class SP_Player_List
8
- * @version 2.6.9
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
@@ -420,8 +420,8 @@ class SP_Player_List extends SP_Secondary_Post {
420
  endif;
421
  endforeach;
422
  elseif ( array_key_exists( $key, $totals[ $player_id ] ) ):
423
- $value = floatval( $value );
424
- $totals[ $player_id ][ $key ] += $value;
425
  endif;
426
  endforeach;
427
 
@@ -601,7 +601,7 @@ class SP_Player_List extends SP_Secondary_Post {
601
  $placeholder = number_format( $placeholder, $stat->precision, '.', '' );
602
  endif;
603
 
604
- $placeholders[ $player_id ][ $stat->post_name ] = $placeholder;
605
  endforeach;
606
 
607
  endforeach;
5
  * The SportsPress player list class handles individual player list data.
6
  *
7
  * @class SP_Player_List
8
+ * @version 2.6.16
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
420
  endif;
421
  endforeach;
422
  elseif ( array_key_exists( $key, $totals[ $player_id ] ) ):
423
+ $add = apply_filters( 'sportspress_player_performance_add_value', floatval( $value ), $key );
424
+ $totals[ $player_id ][ $key ] += $add;
425
  endif;
426
  endforeach;
427
 
601
  $placeholder = number_format( $placeholder, $stat->precision, '.', '' );
602
  endif;
603
 
604
+ $placeholders[ $player_id ][ $stat->post_name ] = apply_filters( 'sportspress_player_performance_table_placeholder', $placeholder, $stat->post_name );
605
  endforeach;
606
 
607
  endforeach;
includes/class-sp-player.php CHANGED
@@ -5,7 +5,7 @@
5
  * The SportsPress player class handles individual player data.
6
  *
7
  * @class SP_Player
8
- * @version 2.6.9
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
@@ -369,8 +369,8 @@ class SP_Player extends SP_Custom_Post {
369
 
370
  foreach ( $player_performance as $key => $value ):
371
  if ( array_key_exists( $key, $totals ) ):
372
- $value = floatval( $value );
373
- $totals[ $key ] += $value;
374
  endif;
375
  endforeach;
376
 
@@ -552,7 +552,7 @@ class SP_Player extends SP_Custom_Post {
552
  endforeach;
553
 
554
  foreach ( $performance_labels as $key => $label ):
555
- $placeholders[ $div_id ][ $key ] = sp_array_value( $totals, $key, 0 );
556
  endforeach;
557
 
558
  endforeach;
5
  * The SportsPress player class handles individual player data.
6
  *
7
  * @class SP_Player
8
+ * @version 2.6.16
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
369
 
370
  foreach ( $player_performance as $key => $value ):
371
  if ( array_key_exists( $key, $totals ) ):
372
+ $add = apply_filters( 'sportspress_player_performance_add_value', floatval( $value ), $key );
373
+ $totals[ $key ] += $add;
374
  endif;
375
  endforeach;
376
 
552
  endforeach;
553
 
554
  foreach ( $performance_labels as $key => $label ):
555
+ $placeholders[ $div_id ][ $key ] = apply_filters( 'sportspress_player_performance_table_placeholder', sp_array_value( $totals, $key, 0 ), $key );
556
  endforeach;
557
 
558
  endforeach;
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.2
7
- Stable tag: 2.6.15
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -237,6 +237,10 @@ When you upgrade to one of the SportsPress Pro licenses, you can simply activate
237
 
238
  == Changelog ==
239
 
 
 
 
 
240
  = 2.6.15 =
241
  * Important - Using Google Maps will require a SportsPress Pro license after August 31, 2019.
242
  * Refactor - Fallback to OpenStreetMap for venue maps without SportsPress Pro.
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 5.2
7
+ Stable tag: 2.6.16
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
237
 
238
  == Changelog ==
239
 
240
+ = 2.6.16 =
241
+ * Tweak - Add support for updated baseball extension with partial innings.
242
+ * Fix - Error displaying staff in events when offense and defense are separate tables.
243
+
244
  = 2.6.15 =
245
  * Important - Using Google Maps will require a SportsPress Pro license after August 31, 2019.
246
  * Refactor - Fallback to OpenStreetMap for venue maps without SportsPress Pro.
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.15
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.15
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
- public $version = '2.6.15';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class
@@ -348,7 +348,7 @@ final class SportsPress {
348
  'name' => 'SportsPress for Baseball',
349
  'slug' => 'sportspress-for-baseball',
350
  'required' => false,
351
- 'version' => '0.9.2',
352
  );
353
  break;
354
  case 'basketball':
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.16
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.16
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
+ public $version = '2.6.16';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class
348
  'name' => 'SportsPress for Baseball',
349
  'slug' => 'sportspress-for-baseball',
350
  'required' => false,
351
+ 'version' => '1.0',
352
  );
353
  break;
354
  case 'basketball':
templates/event-performance-table.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6.12
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -130,7 +130,7 @@ $i = 0;
130
  foreach ( $labels as $key => $label ):
131
  if ( 'name' == $key )
132
  continue;
133
-
134
  $format = sp_array_value( $formats, $key, 'number' );
135
  $placeholder = sp_get_format_placeholder( $format );
136
 
@@ -169,7 +169,7 @@ $i = 0;
169
  endif;
170
 
171
  if ( 'number' === $format ):
172
- $add = floatval( $value );
173
  $totals[ $key ] += $add;
174
  endif;
175
  endif;
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.16
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
130
  foreach ( $labels as $key => $label ):
131
  if ( 'name' == $key )
132
  continue;
133
+
134
  $format = sp_array_value( $formats, $key, 'number' );
135
  $placeholder = sp_get_format_placeholder( $format );
136
 
169
  endif;
170
 
171
  if ( 'number' === $format ):
172
+ $add = apply_filters( 'sportspress_event_performance_add_value', floatval( $value ), $key );
173
  $totals[ $key ] += $add;
174
  endif;
175
  endif;
templates/event-performance.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -96,7 +96,7 @@ if ( is_array( $teams ) ):
96
  $formats[ $column->post_name ] = $format;
97
  }
98
 
99
- do_action( 'sportspress_before_event_performance' );
100
 
101
  if ( $is_individual ) {
102
  // Combined table
@@ -217,6 +217,8 @@ if ( is_array( $teams ) ):
217
  }
218
 
219
  sp_get_template( 'event-performance-table.php', array(
 
 
220
  'section' => $section_id,
221
  'section_label' => $section_label,
222
  'scrollable' => $scrollable,
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.16
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
96
  $formats[ $column->post_name ] = $format;
97
  }
98
 
99
+ do_action( 'sportspress_before_event_performance', $columns );
100
 
101
  if ( $is_individual ) {
102
  // Combined table
217
  }
218
 
219
  sp_get_template( 'event-performance-table.php', array(
220
+ 'id' => $id,
221
+ 'index' => $index,
222
  'section' => $section_id,
223
  'section_label' => $section_label,
224
  'scrollable' => $scrollable,