diff --git a/assets/images/welcome/screenshot-awards.png b/assets/images/welcome/screenshot-awards.png deleted file mode 100644 index 855f86960..000000000 Binary files a/assets/images/welcome/screenshot-awards.png and /dev/null differ diff --git a/assets/images/welcome/screenshot-conditional-equations.png b/assets/images/welcome/screenshot-conditional-equations.png new file mode 100644 index 000000000..5a988271a Binary files /dev/null and b/assets/images/welcome/screenshot-conditional-equations.png differ diff --git a/assets/images/welcome/screenshot-event-performance-importer.png b/assets/images/welcome/screenshot-event-performance-importer.png deleted file mode 100644 index c38b3eeb3..000000000 Binary files a/assets/images/welcome/screenshot-event-performance-importer.png and /dev/null differ diff --git a/assets/images/welcome/screenshot-event-specs.png b/assets/images/welcome/screenshot-event-specs.png new file mode 100644 index 000000000..c2977c83a Binary files /dev/null and b/assets/images/welcome/screenshot-event-specs.png differ diff --git a/assets/images/welcome/screenshot-group-stages.png b/assets/images/welcome/screenshot-group-stages.png deleted file mode 100644 index 54b1525ec..000000000 Binary files a/assets/images/welcome/screenshot-group-stages.png and /dev/null differ diff --git a/assets/images/welcome/screenshot-midseason-transfers.png b/assets/images/welcome/screenshot-midseason-transfers.png new file mode 100644 index 000000000..58409ddaf Binary files /dev/null and b/assets/images/welcome/screenshot-midseason-transfers.png differ diff --git a/assets/images/welcome/screenshot-next-team.png b/assets/images/welcome/screenshot-next-team.png new file mode 100644 index 000000000..9b3401e88 Binary files /dev/null and b/assets/images/welcome/screenshot-next-team.png differ diff --git a/assets/images/welcome/screenshot-officials.png b/assets/images/welcome/screenshot-officials.png deleted file mode 100644 index 75fa1d549..000000000 Binary files a/assets/images/welcome/screenshot-officials.png and /dev/null differ diff --git a/assets/images/welcome/screenshot-performance-icons.png b/assets/images/welcome/screenshot-performance-icons.png deleted file mode 100644 index d14bc39e3..000000000 Binary files a/assets/images/welcome/screenshot-performance-icons.png and /dev/null differ diff --git a/assets/images/welcome/screenshot-results-matrix.png b/assets/images/welcome/screenshot-results-matrix.png new file mode 100644 index 000000000..b32b6a449 Binary files /dev/null and b/assets/images/welcome/screenshot-results-matrix.png differ diff --git a/assets/images/welcome/screenshot-sponsor-levels.png b/assets/images/welcome/screenshot-sponsor-levels.png deleted file mode 100644 index b4377ba7e..000000000 Binary files a/assets/images/welcome/screenshot-sponsor-levels.png and /dev/null differ diff --git a/assets/images/welcome/screenshot-vertical-timelines.png b/assets/images/welcome/screenshot-vertical-timelines.png new file mode 100644 index 000000000..b880f2362 Binary files /dev/null and b/assets/images/welcome/screenshot-vertical-timelines.png differ diff --git a/changelog.txt b/changelog.txt index 81d2ea6c1..db3129977 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ * 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/includes/admin/class-sp-admin-assets.php b/includes/admin/class-sp-admin-assets.php index 1c5b4c455..e3dec5bd9 100755 --- a/includes/admin/class-sp-admin-assets.php +++ b/includes/admin/class-sp-admin-assets.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/class-sp-admin-sports.php b/includes/admin/class-sp-admin-sports.php index 33576416b..6a5974a91 100644 --- a/includes/admin/class-sp-admin-sports.php +++ b/includes/admin/class-sp-admin-sports.php @@ -5,7 +5,7 @@ * The SportsPress admin sports class stores preset sport data. * * @class SP_Admin_Sports - * @version 2.5.2 + * @version 2.6 * @package SportsPress/Admin * @category Class * @author ThemeBoy diff --git a/includes/admin/class-sp-admin-taxonomies.php b/includes/admin/class-sp-admin-taxonomies.php index f0cac9113..e11b2d9a7 100644 --- a/includes/admin/class-sp-admin-taxonomies.php +++ b/includes/admin/class-sp-admin-taxonomies.php @@ -7,7 +7,7 @@ * Handles taxonomies in admin * * @class SP_Admin_Taxonomies - * @version 2.5.1 + * @version 2.6 * @package SportsPress/Admin * @category Class * @author ThemeBoy diff --git a/includes/admin/class-sp-admin-welcome.php b/includes/admin/class-sp-admin-welcome.php index 4b117480c..cc87f02fb 100644 --- a/includes/admin/class-sp-admin-welcome.php +++ b/includes/admin/class-sp-admin-welcome.php @@ -133,8 +133,6 @@ private function intro() { - - -
+
+ Screenshot

Conditional Equations

-

+

Use the newly introduced conditional operators >, <, , , , and to calculate the relationship between variables, then insert that calculation into more complex equations. Visit the Configure page to edit variables and equations.

+ Screenshot

Event Specs

-

-
-
- -
-
-

Countdown Images

-

+

Measure and display additional details per event using the new Event Specs variables. They are customizable and can be useful for keeping track of information like player of the match, attendance, and venue weather.

+ Screenshot

Next Team Column

-

+

Provide a quick overview of who each team is playing next using the new Next Team preset for league table columns. This will automatically display the next team's name or logo that links to the next match for each team in the table.

@@ -213,14 +207,21 @@ public function about_screen() {
-
+
+ Results Matrix

Results Matrix

-

+

Display matches between home and away team in a grid. Create or select an existing calendar and select the Matrix layout to convert the calendar to an interactive results matrix!

+ Midseason Transfers +

Midseason Transfers

+

Keep track of players that switched teams during a season by adding one or more extra rows to their statistics table. Display the team and partial statistics before and after the transfer.

+

+
+ Vertical Timelines

Vertical Timelines

-

+

Display a match commentary style play-by-play timeline within events. Upgrade to SportsPress Pro to get access to Timelines and other pro features.

@@ -233,22 +234,22 @@ public function about_screen() {
-

Data Accuracy and Flexibility

+

Player Data Improvements

-

Relative Date in Shortcodes

-

+

Player Assignments

+

Players will now be saved using a new data format that allows them to belong to multiple leagues, seasons, and teams and be accurately selected in player lists.

-

Current Team in Player Lists

-

+

Current Team Column

+

The Team column in player lists will now display only the current team that player belongs to, determined by the Current Team setting of each player.

Squad Number Zero

-

+

It's now possible to import players with the squad number 0 (zero) or any other value that would previously be interpreted as empty.

@@ -262,16 +263,16 @@ public function about_screen() {
-

Short Names

-

+

Countdown Images

+

A new option has been added to the Countdown widget, allowing you to display a featured image from the next event.

-

Calculating Substitution Time

-

+

Relative Date in Shortcodes

+

You'll now be able to select a relative date range when inserting calendar-related shortcodes from the visual editor.

-

Localization Improvements

-

+

Short Names

+

Teams have been given a Short Name setting in addition to the existing Abbreviation for added customizability.

diff --git a/includes/admin/importers/class-sp-player-importer.php b/includes/admin/importers/class-sp-player-importer.php index 3117d9856..c513b84f7 100644 --- a/includes/admin/importers/class-sp-player-importer.php +++ b/includes/admin/importers/class-sp-player-importer.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Importers - * @version 2.5.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/class-sp-admin-cpt-event.php b/includes/admin/post-types/class-sp-admin-cpt-event.php index bae9b5d8c..b97bb2290 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-event.php +++ b/includes/admin/post-types/class-sp-admin-cpt-event.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Post_Types - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/class-sp-admin-cpt-player.php b/includes/admin/post-types/class-sp-admin-cpt-player.php index 75cf26e50..39fd8d97f 100755 --- a/includes/admin/post-types/class-sp-admin-cpt-player.php +++ b/includes/admin/post-types/class-sp-admin-cpt-player.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Post_Types - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/class-sp-admin-cpt-spec.php b/includes/admin/post-types/class-sp-admin-cpt-spec.php index 8318949d2..23125e9a5 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-spec.php +++ b/includes/admin/post-types/class-sp-admin-cpt-spec.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Post_Types - * @version 0.9 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/class-sp-admin-cpt-team.php b/includes/admin/post-types/class-sp-admin-cpt-team.php index 3a4f2f3a4..16d9b451b 100644 --- a/includes/admin/post-types/class-sp-admin-cpt-team.php +++ b/includes/admin/post-types/class-sp-admin-cpt-team.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Post_Types - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-specs.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-specs.php index 1e4e17c2d..6ef6fb4c1 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-specs.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-event-specs.php @@ -1,11 +1,11 @@ $teams, 'readonly' => $readonly ), $id ); ?>
- +
@@ -166,7 +166,7 @@ public static function table( $id = null, $league_id, $columns = array(), $data if ( $div_id === 0 ) continue; $div = get_term( $div_id, 'sp_season' ); ?> - + @@ -237,10 +237,10 @@ public static function table( $id = null, $league_id, $columns = array(), $data echo $timeval ? $timeval : $placeholder; } else { if ( 'time' === sp_array_value( $formats, $column, 'number' ) ) { - echo ''; + echo ''; echo ''; } else { - echo ''; + echo ''; } } ?> diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php index cc23115f5..9ba10dab9 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-spec-details.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Meta_Boxes - * @version 1.0 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php index e73d08047..9b08d01e2 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-staff-details.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Meta_Boxes - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php b/includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php index c0fe4e8b3..646fb2ae9 100644 --- a/includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php +++ b/includes/admin/post-types/meta-boxes/class-sp-meta-box-team-details.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin/Meta_Boxes - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly diff --git a/includes/admin/settings/class-sp-settings-events.php b/includes/admin/settings/class-sp-settings-events.php index 5834903b4..8a66c5976 100644 --- a/includes/admin/settings/class-sp-settings-events.php +++ b/includes/admin/settings/class-sp-settings-events.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 @@ -278,7 +278,7 @@ public function get_settings() { apply_filters( 'sportspress_eventplayer_options', array( array( - 'title' => __( 'Player Sorting', 'sportspress' ), + 'title' => __( 'Order', 'sportspress' ), 'id' => 'sportspress_event_player_sort', 'default' => 'jersey', 'type' => 'radio', @@ -286,8 +286,7 @@ public function get_settings() { 'jersey'=> __( 'Jersey (e.g. "33. John Doe")', 'sportspress' ), 'name' => __( 'Name (e.g. "John Doe (33)")', 'sportspress' ), ), - 'desc_tip' => _x( 'When editing an event, this determines how the checklist of players are sorted in the Teams metabox. This does not affect the Box Score section.', 'event player sort setting description', 'sportspress' ), - + 'desc_tip' => 'When editing an event, this determines how the checklist of players are sorted in the Teams metabox. This does not affect the Box Score section.', ), ) ), diff --git a/includes/admin/settings/class-sp-settings-modules.php b/includes/admin/settings/class-sp-settings-modules.php index 2353410a9..462927bdc 100644 --- a/includes/admin/settings/class-sp-settings-modules.php +++ b/includes/admin/settings/class-sp-settings-modules.php @@ -5,7 +5,7 @@ * @author ThemeBoy * @category Admin * @package SportsPress/Admin - * @version 2.5 + * @version 2.6 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly @@ -74,25 +74,6 @@ public function output() {
- - - - - - - - -
- <?php _e( 'WordPay', 'sportspress' ); ?> -
-

-

- - -

-
- - diff --git a/includes/admin/settings/class-sp-settings-teams.php b/includes/admin/settings/class-sp-settings-teams.php index 9041c13c7..3043de94f 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 2f4e1cc7d..8ee51ed49 100644 --- a/includes/class-sp-ajax.php +++ b/includes/class-sp-ajax.php @@ -8,7 +8,7 @@ * 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 58756e1d2..1b0ae5c9d 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 ba695566c..e2553030a 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 289997821..227e1eb64 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 @@ public function __construct() { '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 2f43c78c4..f4c1478b7 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 12d9f735a..fc54d9b54 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 @@ public function data( $league_id, $admin = false, $section = -1 ) { $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 @@ public function data( $league_id, $admin = false, $section = -1 ) { ); 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 @@ public function data( $league_id, $admin = false, $section = -1 ) { 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 7a3a78e11..31d4dc2b4 100644 --- a/includes/class-sp-post-types.php +++ b/includes/class-sp-post-types.php @@ -9,7 +9,7 @@ * 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 e429b111a..f21464058 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 89b4ab624..01f17c7c6 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 e8d9828a1..4a9949f6c 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 9369f5d38..e7977f2f1 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 0a8aed14a..7de98ac11 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 15c47c0a1..bb9d6eea3 100644 --- a/modules/sportspress-conditional-equations.php +++ b/modules/sportspress-conditional-equations.php @@ -5,7 +5,7 @@ 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 @@ * Main SportsPress Conditional Equations Class * * @class SportsPress_Conditional_Equations - * @version 2.5.10 + * @version 2.6 */ class SportsPress_Conditional_Equations { @@ -42,7 +42,7 @@ public function __construct() { */ 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 51585905d..1496ff343 100644 --- a/modules/sportspress-countdowns.php +++ b/modules/sportspress-countdowns.php @@ -5,7 +5,7 @@ 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 @@ * Main SportsPress Countdowns Class * * @class SportsPress_Countdowns - * @version 2.0 + * @version 2.6 */ class SportsPress_Countdowns { @@ -41,7 +41,7 @@ public function __construct() { */ 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 34eab80ec..69277bacd 100644 --- a/modules/sportspress-event-specs.php +++ b/modules/sportspress-event-specs.php @@ -5,7 +5,7 @@ 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 @@ * Main SportsPress Event Specs Class * * @class SportsPress_Event_Specs - * @version 2.5.10 + * @version 2.6 */ class SportsPress_Event_Specs { @@ -48,7 +48,7 @@ public function __construct() { */ 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 c82efe530..b95426174 100644 --- a/modules/sportspress-officials.php +++ b/modules/sportspress-officials.php @@ -5,7 +5,7 @@ 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 @@ * Main SportsPress Officials Class * * @class SportsPress_Officials - * @version 2.5.1 + * @version 2.6 */ class SportsPress_Officials { @@ -66,7 +66,7 @@ public function __construct() { */ 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 a98ba85fe..88b407e53 100644 --- a/modules/sportspress-player-assignments.php +++ b/modules/sportspress-player-assignments.php @@ -5,7 +5,7 @@ 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 @@ * Main SportsPress Player Assignments Class * * @class SportsPress_Player_Assignments - * @version 2.6.0 + * @version 2.6 */ class SportsPress_Player_Assignments { /** @@ -36,7 +36,7 @@ public function __construct() { */ 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 @@ public function save( $post_id ) { 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 a93411cf4..f5dab27e5 100644 --- a/modules/sportspress-wordpay.php +++ b/modules/sportspress-wordpay.php @@ -5,7 +5,7 @@ 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 @@ * Main SportsPress WordPay Class * * @class SportsPress_WordPay - * @version 2.4.1 + * @version 2.6 */ class SportsPress_WordPay { @@ -47,7 +47,7 @@ public function __construct() { */ 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 @@ public static function widget_shortcode( $shortcode = '[wpay-register]', $instan 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 b7d2c0ec0..ae3c0ee5f 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 2232127dd..3307203fc 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 @@ * 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 e8a5ccfa3..de3d81f33 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 64d10040c..454ca0f6a 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 6c5f3429c..1710f6bad 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 b8e287ff0..7c7e7c6a8 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 a6dcd4162..392c4a729 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 cc730fc7d..684abb8b9 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 07dc2b7f9..bae7545d5 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 aac8654f9..48be84c14 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 249c19498..81560b951 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 dadd2fa1f..723aa2635 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 4fe1c0cde..43ed36080 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 4ac175acf..f7ed04631 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 @@ function sortByOrder($a, $b) { 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 6e400e541..ce04eb61f 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 df5b86234..0a53d2b4f 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