SportsPress – Sports Club & League Manager - Version 2.6.10

Version Description

  • Tweak - Apply reverse teams settings to logos.
  • Fix - Statistics doubling in player lists when player is assigned to a team.
  • Fix - Display blank placeholder in player lists when no team is assigned.
  • Preset - Update basketball efficiency rating equation.
Download this release

Release Info

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

Code changes from version 2.6.9 to 2.6.10

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == SportsPress Changelog ==
2
 
 
 
 
 
 
 
3
  = 2.6.9 =
4
  * Feature - New event shortcodes: venue, officials, teams, and full event info.
5
  * Feature - Option to choose default nationality for faster data entry.
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.
6
+ * Fix - Display blank placeholder in player lists when no team is assigned.
7
+ * Preset - Update basketball efficiency rating equation.
8
+
9
  = 2.6.9 =
10
  * Feature - New event shortcodes: venue, officials, teams, and full event info.
11
  * Feature - Option to choose default nationality for faster data entry.
modules/sportspress-player-assignments.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
5
  Description: Add player assignments support to SportsPress.
6
  Author: Savvas
7
  Author URI: http://themeboy.com/
8
- Version: 2.6.8
9
  */
10
  // Exit if accessed directly
11
  if ( ! defined( 'ABSPATH' ) ) exit;
@@ -14,7 +14,7 @@ if ( ! class_exists( 'SportsPress_Player_Assignments' ) ) :
14
  * Main SportsPress Player Assignments Class
15
  *
16
  * @class SportsPress_Player_Assignments
17
- * @version 2.6.8
18
  */
19
  class SportsPress_Player_Assignments {
20
  /**
@@ -36,7 +36,7 @@ class SportsPress_Player_Assignments {
36
  */
37
  private function define_constants() {
38
  if ( !defined( 'SP_PLAYER_ASSIGNMENTS_VERSION' ) )
39
- define( 'SP_PLAYER_ASSIGNMENTS_VERSION', '2.6.8' );
40
  if ( !defined( 'SP_PLAYER_ASSIGNMENTS_URL' ) )
41
  define( 'SP_PLAYER_ASSIGNMENTS_URL', plugin_dir_url( __FILE__ ) );
42
  if ( !defined( 'SP_PLAYER_ASSIGNMENTS_DIR' ) )
@@ -183,6 +183,8 @@ class SportsPress_Player_Assignments {
183
 
184
  $players = array_merge( $assigned_players, $players );
185
 
 
 
186
  foreach ( $players as $i => $player ) {
187
  $player->sp_number = get_post_meta( $player->ID, 'sp_number', true );
188
  }
5
  Description: Add player assignments support to SportsPress.
6
  Author: Savvas
7
  Author URI: http://themeboy.com/
8
+ Version: 2.6.10
9
  */
10
  // Exit if accessed directly
11
  if ( ! defined( 'ABSPATH' ) ) exit;
14
  * Main SportsPress Player Assignments Class
15
  *
16
  * @class SportsPress_Player_Assignments
17
+ * @version 2.6.10
18
  */
19
  class SportsPress_Player_Assignments {
20
  /**
36
  */
37
  private function define_constants() {
38
  if ( !defined( 'SP_PLAYER_ASSIGNMENTS_VERSION' ) )
39
+ define( 'SP_PLAYER_ASSIGNMENTS_VERSION', '2.6.10' );
40
  if ( !defined( 'SP_PLAYER_ASSIGNMENTS_URL' ) )
41
  define( 'SP_PLAYER_ASSIGNMENTS_URL', plugin_dir_url( __FILE__ ) );
42
  if ( !defined( 'SP_PLAYER_ASSIGNMENTS_DIR' ) )
183
 
184
  $players = array_merge( $assigned_players, $players );
185
 
186
+ $players = array_map( 'unserialize', array_unique( array_map( 'serialize', $players ) ) );
187
+
188
  foreach ( $players as $i => $player ) {
189
  $player->sp_number = get_post_meta( $player->ID, 'sp_number', true );
190
  }
presets/team-sports/basketball.json CHANGED
@@ -67,9 +67,9 @@
67
  { "name" : "SPG", "equation" : "$stl / $eventsplayed", "precision" : 1, "type" : "average", "description" : "Steals per game" },
68
  { "name" : "BPG", "equation" : "$blk / $eventsplayed", "precision" : 1, "type" : "average", "description" : "Blocks per game" },
69
  { "name" : "PPG", "equation" : "$pts / $eventsplayed", "precision" : 1, "type" : "average", "description" : "Points per game" },
70
- { "name" : "EFF", "equation" : "$pts + $off + $def + $ast + $stl + $blk - $fga + $fgm - $fta + $ftm + $to", "type" : "average", "description" : "Efficiency rating" }
71
  ],
72
  "options": {
73
  "mode" : "team"
74
  }
75
- }
67
  { "name" : "SPG", "equation" : "$stl / $eventsplayed", "precision" : 1, "type" : "average", "description" : "Steals per game" },
68
  { "name" : "BPG", "equation" : "$blk / $eventsplayed", "precision" : 1, "type" : "average", "description" : "Blocks per game" },
69
  { "name" : "PPG", "equation" : "$pts / $eventsplayed", "precision" : 1, "type" : "average", "description" : "Points per game" },
70
+ { "name" : "EFF", "equation" : "$pts + $off + $def + $ast + $stl + $blk - $fga + $fgm - $fta + $ftm - $to", "type" : "average", "description" : "Efficiency rating" }
71
  ],
72
  "options": {
73
  "mode" : "team"
74
  }
75
+ }
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: 4.9
7
- Stable tag: 2.6.9
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -237,6 +237,12 @@ When you upgrade to one of the SportsPress Pro licenses, you can simply activate
237
 
238
  == Changelog ==
239
 
 
 
 
 
 
 
240
  = 2.6.9 =
241
  * Feature - New event shortcodes: venue, officials, teams, and full event info.
242
  * Feature - Option to choose default nationality for faster data entry.
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 2.6.10
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
237
 
238
  == Changelog ==
239
 
240
+ = 2.6.10 =
241
+ * Tweak - Apply reverse teams settings to logos.
242
+ * Fix - Statistics doubling in player lists when player is assigned to a team.
243
+ * Fix - Display blank placeholder in player lists when no team is assigned.
244
+ * Preset - Update basketball efficiency rating equation.
245
+
246
  = 2.6.9 =
247
  * Feature - New event shortcodes: venue, officials, teams, and full event info.
248
  * Feature - Option to choose default nationality for faster data entry.
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.9
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.9
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
- public $version = '2.6.9';
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.10
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.10
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
+ public $version = '2.6.10';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class
templates/event-logos.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6.5
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -35,6 +35,9 @@ if ( $show_results ) {
35
  $show_results = false;
36
  } else {
37
  $show_time = false;
 
 
 
38
  }
39
  } else {
40
  $results = array();
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.10
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
35
  $show_results = false;
36
  } else {
37
  $show_time = false;
38
+ if ( $reverse_teams ) {
39
+ $results = array_reverse( $results );
40
+ }
41
  }
42
  } else {
43
  $results = array();
templates/player-list.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.6.9
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -194,7 +194,7 @@ foreach ( $groups as $group ):
194
 
195
  if ( array_key_exists( 'team', $labels ) ):
196
  $team = sp_array_value( $row, 'team', get_post_meta( $id, 'sp_current_team', true ) );
197
- $team_name = sp_team_short_name( $team );
198
  if ( $link_teams && false !== get_post_status( $team ) ):
199
  $team_name = '<a href="' . get_post_permalink( $team ) . '">' . $team_name . '</a>';
200
  endif;
@@ -250,4 +250,4 @@ foreach ( $groups as $group ):
250
  $output .= '</div>';
251
  endforeach;
252
  ?>
253
- <?php echo $output; ?>
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.10
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
194
 
195
  if ( array_key_exists( 'team', $labels ) ):
196
  $team = sp_array_value( $row, 'team', get_post_meta( $id, 'sp_current_team', true ) );
197
+ $team_name = $team ? sp_team_short_name( $team ) : '-';
198
  if ( $link_teams && false !== get_post_status( $team ) ):
199
  $team_name = '<a href="' . get_post_permalink( $team ) . '">' . $team_name . '</a>';
200
  endif;
250
  $output .= '</div>';
251
  endforeach;
252
  ?>
253
+ <?php echo $output; ?>