diff --git a/includes/admin/settings/class-sp-settings-teams.php b/includes/admin/settings/class-sp-settings-teams.php
index 9041c13c..3043de94 100644
--- a/includes/admin/settings/class-sp-settings-teams.php
+++ b/includes/admin/settings/class-sp-settings-teams.php
@@ -5,7 +5,7 @@
* @author ThemeBoy
* @category Admin
* @package SportsPress/Admin
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/includes/class-sp-ajax.php b/includes/class-sp-ajax.php
index 2f4e1cc7..8ee51ed4 100644
--- a/includes/class-sp-ajax.php
+++ b/includes/class-sp-ajax.php
@@ -8,7 +8,7 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
* AJAX Event Handler
*
* @class SP_AJAX
- * @version 2.5.5
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
diff --git a/includes/class-sp-event.php b/includes/class-sp-event.php
index 58756e1d..1b0ae5c9 100644
--- a/includes/class-sp-event.php
+++ b/includes/class-sp-event.php
@@ -5,7 +5,7 @@
* The SportsPress event class handles individual event data.
*
* @class SP_Event
- * @version 2.5.2
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
diff --git a/includes/class-sp-league-table.php b/includes/class-sp-league-table.php
index ba695566..e2553030 100644
--- a/includes/class-sp-league-table.php
+++ b/includes/class-sp-league-table.php
@@ -5,7 +5,7 @@
* The SportsPress league table class handles individual league table data.
*
* @class SP_League_Table
- * @version 2.5
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
diff --git a/includes/class-sp-modules.php b/includes/class-sp-modules.php
index 28999782..227e1eb6 100644
--- a/includes/class-sp-modules.php
+++ b/includes/class-sp-modules.php
@@ -5,7 +5,7 @@
* The SportsPress modules class stores available modules.
*
* @class SP_Modules
- * @version 2.5
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
@@ -173,14 +173,6 @@ class SP_Modules {
'link' => 'https://www.themeboy.com/sportspress-extensions/sponsors/',
'desc' => __( 'Attract sponsors by offering them advertising space on your website.', 'sportspress' ),
),
- 'wordpay' => array(
- 'label' => __( 'WordPay', 'sportspress' ),
- 'class' => 'WordPay',
- 'icon' => 'sp-icon-wordpay',
- 'link' => 'https://wordpay.org/sportspress/',
- 'desc' => __( 'Start collecting club membership payments with WordPay.', 'sportspress' ),
- 'tip' => __( 'Get WordPay', 'sportspress' ),
- ),
),
));
diff --git a/includes/class-sp-player-list.php b/includes/class-sp-player-list.php
index 2f43c78c..f4c1478b 100644
--- a/includes/class-sp-player-list.php
+++ b/includes/class-sp-player-list.php
@@ -5,7 +5,7 @@
* The SportsPress player list class handles individual player list data.
*
* @class SP_Player_List
- * @version 2.5.5
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
diff --git a/includes/class-sp-player.php b/includes/class-sp-player.php
index 12d9f735..fc54d9b5 100644
--- a/includes/class-sp-player.php
+++ b/includes/class-sp-player.php
@@ -5,7 +5,7 @@
* The SportsPress player class handles individual player data.
*
* @class SP_Player
- * @version 2.5
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
@@ -256,8 +256,11 @@ class SP_Player extends SP_Custom_Post {
$data = array();
+ $league_stats = sp_array_value( $stats, $league_id, array() );
+ $div_ids = apply_filters( 'sportspress_player_data_season_ids', $div_ids, $league_stats );
+
// Get all seasons populated with data where available
- $data = sp_array_combine( $div_ids, sp_array_value( $stats, $league_id, array() ), true );
+ $data = sp_array_combine( $div_ids, $league_stats, true );
// Get equations from statistic variables
$equations = sp_get_var_equations( 'sp_statistic' );
@@ -340,7 +343,7 @@ class SP_Player extends SP_Custom_Post {
);
endif;
- $args = apply_filters( 'sportspress_player_data_event_args', $args );
+ $args = apply_filters( 'sportspress_player_data_event_args', $args, $data, $div_id );
$events = get_posts( $args );
@@ -597,7 +600,7 @@ class SP_Player extends SP_Custom_Post {
if ( -1 == $team_id )
continue;
- $season_name = sp_array_value( $season_names, $season_id, ' ' );
+ $season_name = sp_array_value( $season_names, (int) $season_id, ' ' );
if ( $team_id ):
$team_name = sp_team_short_name( $team_id );
diff --git a/includes/class-sp-post-types.php b/includes/class-sp-post-types.php
index 7a3a78e1..31d4dc2b 100644
--- a/includes/class-sp-post-types.php
+++ b/includes/class-sp-post-types.php
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
* Registers post types and taxonomies
*
* @class SP_Post_types
- * @version 2.5.5
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
diff --git a/includes/class-sp-team.php b/includes/class-sp-team.php
index e429b111..f2146405 100644
--- a/includes/class-sp-team.php
+++ b/includes/class-sp-team.php
@@ -5,7 +5,7 @@
* The SportsPress team class handles individual team data.
*
* @class SP_Team
- * @version 2.2.4
+ * @version 2.6
* @package SportsPress/Classes
* @category Class
* @author ThemeBoy
diff --git a/includes/sp-api-functions.php b/includes/sp-api-functions.php
index 89b4ab62..01f17c7c 100644
--- a/includes/sp-api-functions.php
+++ b/includes/sp-api-functions.php
@@ -7,7 +7,7 @@
* @author ThemeBoy
* @category Core
* @package SportsPress/Functions
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/includes/sp-core-functions.php b/includes/sp-core-functions.php
index e8d9828a..4a9949f6 100644
--- a/includes/sp-core-functions.php
+++ b/includes/sp-core-functions.php
@@ -7,7 +7,7 @@
* @author ThemeBoy
* @category Core
* @package SportsPress/Functions
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/includes/sp-deprecated-functions.php b/includes/sp-deprecated-functions.php
index 9369f5d3..e7977f2f 100644
--- a/includes/sp-deprecated-functions.php
+++ b/includes/sp-deprecated-functions.php
@@ -7,7 +7,7 @@
* @author ThemeBoy
* @category Core
* @package ThemeBoy/Functions
- * @version 1.6.1
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/includes/sp-template-hooks.php b/includes/sp-template-hooks.php
index 0a8aed14..7de98ac1 100644
--- a/includes/sp-template-hooks.php
+++ b/includes/sp-template-hooks.php
@@ -7,7 +7,7 @@
* @author ThemeBoy
* @category Core
* @package SportsPress/Functions
- * @version 2.5.10
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/modules/sportspress-conditional-equations.php b/modules/sportspress-conditional-equations.php
index 15c47c0a..bb9d6eea 100644
--- a/modules/sportspress-conditional-equations.php
+++ b/modules/sportspress-conditional-equations.php
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
Description: Add conditional equations to SportsPress.
Author: ThemeBoy
Author URI: http://themeboy.com/
-Version: 2.5.10
+Version: 2.6
*/
// Exit if accessed directly
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Conditional_Equations' ) ) :
* Main SportsPress Conditional Equations Class
*
* @class SportsPress_Conditional_Equations
- * @version 2.5.10
+ * @version 2.6
*/
class SportsPress_Conditional_Equations {
@@ -42,7 +42,7 @@ if ( ! class_exists( 'SportsPress_Conditional_Equations' ) ) :
*/
private function define_constants() {
if ( !defined( 'SP_CONDITIONAL_EQUATIONS_VERSION' ) )
- define( 'SP_CONDITIONAL_EQUATIONS_VERSION', '2.5.10' );
+ define( 'SP_CONDITIONAL_EQUATIONS_VERSION', '2.6' );
if ( !defined( 'SP_CONDITIONAL_EQUATIONS_URL' ) )
define( 'SP_CONDITIONAL_EQUATIONS_URL', plugin_dir_url( __FILE__ ) );
diff --git a/modules/sportspress-countdowns.php b/modules/sportspress-countdowns.php
index 51585905..1496ff34 100644
--- a/modules/sportspress-countdowns.php
+++ b/modules/sportspress-countdowns.php
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
Description: Add countdown widgets to SportsPress.
Author: ThemeBoy
Author URI: http://themeboy.com/
-Version: 2.0
+Version: 2.6
*/
// Exit if accessed directly
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Countdowns' ) ) :
* Main SportsPress Countdowns Class
*
* @class SportsPress_Countdowns
- * @version 2.0
+ * @version 2.6
*/
class SportsPress_Countdowns {
@@ -41,7 +41,7 @@ class SportsPress_Countdowns {
*/
private function define_constants() {
if ( !defined( 'SP_COUNTDOWNS_VERSION' ) )
- define( 'SP_COUNTDOWNS_VERSION', '2.0' );
+ define( 'SP_COUNTDOWNS_VERSION', '2.6' );
if ( !defined( 'SP_COUNTDOWNS_URL' ) )
define( 'SP_COUNTDOWNS_URL', plugin_dir_url( __FILE__ ) );
diff --git a/modules/sportspress-event-specs.php b/modules/sportspress-event-specs.php
index 34eab80e..69277bac 100644
--- a/modules/sportspress-event-specs.php
+++ b/modules/sportspress-event-specs.php
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
Description: Add event specs/stats to SportsPress.
Author: ThemeBoy
Author URI: http://themeboy.com/
-Version: 2.5.10
+Version: 2.6
*/
// Exit if accessed directly
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Event_Specs' ) ) :
* Main SportsPress Event Specs Class
*
* @class SportsPress_Event_Specs
- * @version 2.5.10
+ * @version 2.6
*/
class SportsPress_Event_Specs {
@@ -48,7 +48,7 @@ class SportsPress_Event_Specs {
*/
private function define_constants() {
if ( !defined( 'SP_EVENT_SPECS_VERSION' ) )
- define( 'SP_EVENT_SPECS_VERSION', '2.5.10' );
+ define( 'SP_EVENT_SPECS_VERSION', '2.6' );
if ( !defined( 'SP_EVENT_SPECS_URL' ) )
define( 'SP_EVENT_SPECS_URL', plugin_dir_url( __FILE__ ) );
diff --git a/modules/sportspress-officials.php b/modules/sportspress-officials.php
index c82efe53..b9542617 100644
--- a/modules/sportspress-officials.php
+++ b/modules/sportspress-officials.php
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
Description: Add officials to SportsPress.
Author: ThemeBoy
Author URI: http://themeboy.com/
-Version: 2.5.1
+Version: 2.6
*/
// Exit if accessed directly
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Officials' ) ) :
* Main SportsPress Officials Class
*
* @class SportsPress_Officials
- * @version 2.5.1
+ * @version 2.6
*/
class SportsPress_Officials {
@@ -66,7 +66,7 @@ class SportsPress_Officials {
*/
private function define_constants() {
if ( !defined( 'SP_OFFICIALS_VERSION' ) )
- define( 'SP_OFFICIALS_VERSION', '2.5.1' );
+ define( 'SP_OFFICIALS_VERSION', '2.6' );
if ( !defined( 'SP_OFFICIALS_URL' ) )
define( 'SP_OFFICIALS_URL', plugin_dir_url( __FILE__ ) );
diff --git a/modules/sportspress-player-assignments.php b/modules/sportspress-player-assignments.php
index a98ba85f..88b407e5 100644
--- a/modules/sportspress-player-assignments.php
+++ b/modules/sportspress-player-assignments.php
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
Description: Add player assignments support to SportsPress.
Author: Savvas
Author URI: http://themeboy.com/
-Version: 2.6.0
+Version: 2.6
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
@@ -14,7 +14,7 @@ if ( ! class_exists( 'SportsPress_Player_Assignments' ) ) :
* Main SportsPress Player Assignments Class
*
* @class SportsPress_Player_Assignments
- * @version 2.6.0
+ * @version 2.6
*/
class SportsPress_Player_Assignments {
/**
@@ -36,7 +36,7 @@ class SportsPress_Player_Assignments {
*/
private function define_constants() {
if ( !defined( 'SP_PLAYER_ASSIGNMENTS_VERSION' ) )
- define( 'SP_PLAYER_ASSIGNMENTS_VERSION', '2.6.0' );
+ define( 'SP_PLAYER_ASSIGNMENTS_VERSION', '2.6' );
if ( !defined( 'SP_PLAYER_ASSIGNMENTS_URL' ) )
define( 'SP_PLAYER_ASSIGNMENTS_URL', plugin_dir_url( __FILE__ ) );
if ( !defined( 'SP_PLAYER_ASSIGNMENTS_DIR' ) )
@@ -57,7 +57,7 @@ class SportsPress_Player_Assignments {
if ( 0 === $l_id ) continue;
foreach ( $season as $s_id => $team_id ) {
if ( 0 >= $team_id ) continue;
- $serialized = $l_id.'_'.$s_id.'_'.$team_id;
+ $serialized = intval($l_id).'_'.intval($s_id).'_'.intval($team_id);
add_post_meta( $post_id, 'sp_assignments', $serialized, false );
}
}
diff --git a/modules/sportspress-wordpay.php b/modules/sportspress-wordpay.php
index a93411cf..f5dab27e 100644
--- a/modules/sportspress-wordpay.php
+++ b/modules/sportspress-wordpay.php
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
Description: Add team and player registration shortcodes to WordPay.
Author: ThemeBoy
Author URI: http://themeboy.com/
-Version: 2.4.1
+Version: 2.6
*/
// Exit if accessed directly
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_WordPay' ) ) :
* Main SportsPress WordPay Class
*
* @class SportsPress_WordPay
- * @version 2.4.1
+ * @version 2.6
*/
class SportsPress_WordPay {
@@ -47,7 +47,7 @@ class SportsPress_WordPay {
*/
private function define_constants() {
if ( !defined( 'SP_WORDPAY_VERSION' ) )
- define( 'SP_WORDPAY_VERSION', '2.4.1' );
+ define( 'SP_WORDPAY_VERSION', '2.6' );
if ( !defined( 'SP_WORDPAY_URL' ) )
define( 'SP_WORDPAY_URL', plugin_dir_url( __FILE__ ) );
@@ -232,6 +232,4 @@ class SportsPress_WordPay {
endif;
-if ( get_option( 'sportspress_load_wordpay_module', 'yes' ) == 'yes' ) {
- new SportsPress_WordPay();
-}
\ No newline at end of file
+new SportsPress_WordPay();
\ No newline at end of file
diff --git a/readme.txt b/readme.txt
index b7d2c0ec..ae3c0ee5 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: calendars, club, club management, esports, events, fixtures, leagues, leag
Donate link: http://tboy.co/donate
Requires at least: 3.8
Tested up to: 4.9
-Stable tag: 2.6-RC1
+Stable tag: 2.6
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -244,6 +244,7 @@ When you upgrade to one of the SportsPress Pro licenses, you can simply activate
* Feature - Short name option added to teams.
* Feature - Automatic event titles using short name when available.
* Feature - Display featured image in countdown widget.
+* Tweak - Stronger connections between leagues, seasons, and teams for automatic player lists.
* Tweak - Relative date option added to editor shortcodes.
* Tweak - Display only current team in player list.
* Tweak - Filter players dropdown by current team only.
diff --git a/sportspress.php b/sportspress.php
index 2232127d..3307203f 100644
--- a/sportspress.php
+++ b/sportspress.php
@@ -3,7 +3,7 @@
* Plugin Name: SportsPress
* Plugin URI: http://themeboy.com/sportspress/
* Description: Manage your club and its players, staff, events, league tables, and player lists.
- * Version: 2.6-RC1
+ * Version: 2.6
* Author: ThemeBoy
* Author URI: http://themeboy.com
* Requires at least: 3.8
@@ -26,14 +26,14 @@ if ( ! class_exists( 'SportsPress' ) ) :
* Main SportsPress Class
*
* @class SportsPress
- * @version 2.6-RC1
+ * @version 2.6
*/
final class SportsPress {
/**
* @var string
*/
- public $version = '2.6-RC1';
+ public $version = '2.6';
/**
* @var SportsPress The single instance of the class
diff --git a/templates/countdown.php b/templates/countdown.php
index e8a5ccfa..de3d81f3 100644
--- a/templates/countdown.php
+++ b/templates/countdown.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/event-list.php b/templates/event-list.php
index 64d10040..454ca0f6 100644
--- a/templates/event-list.php
+++ b/templates/event-list.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/event-logos-block.php b/templates/event-logos-block.php
index 6c5f3429..1710f6ba 100644
--- a/templates/event-logos-block.php
+++ b/templates/event-logos-block.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.2
+ * @version 2.6
*/
?>
diff --git a/templates/event-logos-inline.php b/templates/event-logos-inline.php
index b8e287ff..7c7e7c6a 100644
--- a/templates/event-logos-inline.php
+++ b/templates/event-logos-inline.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.2
+ * @version 2.6
*/
$team_logos = array();
diff --git a/templates/event-logos.php b/templates/event-logos.php
index a6dcd416..392c4a72 100644
--- a/templates/event-logos.php
+++ b/templates/event-logos.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.2
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/event-performance.php b/templates/event-performance.php
index cc730fc7..684abb8b 100644
--- a/templates/event-performance.php
+++ b/templates/event-performance.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/event-results.php b/templates/event-results.php
index 07dc2b7f..bae7545d 100644
--- a/templates/event-results.php
+++ b/templates/event-results.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/official-details.php b/templates/official-details.php
index aac8654f..48be84c1 100644
--- a/templates/official-details.php
+++ b/templates/official-details.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/player-details.php b/templates/player-details.php
index 249c1949..81560b95 100644
--- a/templates/player-details.php
+++ b/templates/player-details.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/player-list.php b/templates/player-list.php
index dadd2fa1..723aa263 100644
--- a/templates/player-list.php
+++ b/templates/player-list.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/player-selector.php b/templates/player-selector.php
index 4fe1c0cd..43ed3608 100644
--- a/templates/player-selector.php
+++ b/templates/player-selector.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.3
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/player-statistics.php b/templates/player-statistics.php
index 4ac175ac..f7ed0463 100644
--- a/templates/player-statistics.php
+++ b/templates/player-statistics.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.2.4
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -74,12 +74,7 @@ if ( is_array( $leagues ) ):
if ( ! $show_teams ) {
$args['hide_teams'] = true;
}
-
- if ( has_action( 'sportspress_player_statistics_league_template' ) ) {
- do_action( 'sportspress_player_statistics_league_template', $args );
- } else {
- sp_get_template( 'player-statistics-league.php', $args );
- }
+ sp_get_template( 'player-statistics-league.php', $args );
endforeach;
if ( $show_career_totals ) {
diff --git a/templates/staff-details.php b/templates/staff-details.php
index 6e400e54..ce04eb61 100644
--- a/templates/staff-details.php
+++ b/templates/staff-details.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.0
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
diff --git a/templates/staff-header.php b/templates/staff-header.php
index df5b8623..0a53d2b4 100644
--- a/templates/staff-header.php
+++ b/templates/staff-header.php
@@ -4,7 +4,7 @@
*
* @author ThemeBoy
* @package SportsPress/Templates
- * @version 2.5.5
+ * @version 2.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly