SportsPress – Sports Club & League Manager - Version 2.6.13

Version Description

  • Fix - Missing functionality with Gutenberg enabled.
  • Fix - Enable API endpoints with WordPress 5.0 and Gutenberg.
Download this release

Release Info

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

Code changes from version 2.6.12 to 2.6.13

changelog.txt CHANGED
@@ -1,5 +1,9 @@
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.
1
  == SportsPress Changelog ==
2
 
3
+ = 2.6.13 =
4
+ * Fix - Missing functionality with Gutenberg enabled.
5
+ * Fix - Enable API endpoints with WordPress 5.0 and Gutenberg.
6
+
7
  = 2.6.12 =
8
  * Tweak - Match styling of date row in countdown.
9
  * Fix - Calculated totals in player performance array missing for custom templates.
includes/class-sp-post-types.php CHANGED
@@ -9,7 +9,7 @@ if ( ! defined( 'ABSPATH' ) ) {
9
  * Registers post types and taxonomies
10
  *
11
  * @class SP_Post_types
12
- * @version 2.6.11
13
  * @package SportsPress/Classes
14
  * @category Class
15
  * @author ThemeBoy
@@ -223,8 +223,6 @@ class SP_Post_types {
223
  public static function register_post_types() {
224
  do_action( 'sportspress_register_post_type' );
225
 
226
- $show_in_rest = ! function_exists( 'register_block_type' );
227
-
228
  register_post_type( 'sp_result',
229
  apply_filters( 'sportspress_register_post_type_result',
230
  array(
@@ -438,7 +436,7 @@ class SP_Post_types {
438
  'has_archive' => false,
439
  'show_in_nav_menus' => true,
440
  'menu_icon' => 'dashicons-calendar',
441
- 'show_in_rest' => $show_in_rest,
442
  'rest_controller_class' => 'SP_REST_Posts_Controller',
443
  'rest_base' => 'events',
444
  );
@@ -479,7 +477,7 @@ class SP_Post_types {
479
  'has_archive' => false,
480
  'show_in_nav_menus' => true,
481
  'menu_icon' => 'dashicons-shield-alt',
482
- 'show_in_rest' => $show_in_rest,
483
  'rest_controller_class' => 'SP_REST_Posts_Controller',
484
  'rest_base' => 'teams',
485
  )
@@ -516,7 +514,7 @@ class SP_Post_types {
516
  'has_archive' => false,
517
  'show_in_nav_menus' => true,
518
  'menu_icon' => 'dashicons-groups',
519
- 'show_in_rest' => $show_in_rest,
520
  'rest_controller_class' => 'SP_REST_Posts_Controller',
521
  'rest_base' => 'players',
522
  )
@@ -553,7 +551,7 @@ class SP_Post_types {
553
  'has_archive' => false,
554
  'show_in_nav_menus' => true,
555
  'menu_icon' => 'dashicons-businessman',
556
- 'show_in_rest' => $show_in_rest,
557
  'rest_controller_class' => 'SP_REST_Posts_Controller',
558
  'rest_base' => 'staff',
559
  )
9
  * Registers post types and taxonomies
10
  *
11
  * @class SP_Post_types
12
+ * @version 2.6.13
13
  * @package SportsPress/Classes
14
  * @category Class
15
  * @author ThemeBoy
223
  public static function register_post_types() {
224
  do_action( 'sportspress_register_post_type' );
225
 
 
 
226
  register_post_type( 'sp_result',
227
  apply_filters( 'sportspress_register_post_type_result',
228
  array(
436
  'has_archive' => false,
437
  'show_in_nav_menus' => true,
438
  'menu_icon' => 'dashicons-calendar',
439
+ 'show_in_rest' => true,
440
  'rest_controller_class' => 'SP_REST_Posts_Controller',
441
  'rest_base' => 'events',
442
  );
477
  'has_archive' => false,
478
  'show_in_nav_menus' => true,
479
  'menu_icon' => 'dashicons-shield-alt',
480
+ 'show_in_rest' => true,
481
  'rest_controller_class' => 'SP_REST_Posts_Controller',
482
  'rest_base' => 'teams',
483
  )
514
  'has_archive' => false,
515
  'show_in_nav_menus' => true,
516
  'menu_icon' => 'dashicons-groups',
517
+ 'show_in_rest' => true,
518
  'rest_controller_class' => 'SP_REST_Posts_Controller',
519
  'rest_base' => 'players',
520
  )
551
  'has_archive' => false,
552
  'show_in_nav_menus' => true,
553
  'menu_icon' => 'dashicons-businessman',
554
+ 'show_in_rest' => true,
555
  'rest_controller_class' => 'SP_REST_Posts_Controller',
556
  'rest_base' => 'staff',
557
  )
modules/sportspress-gutenberg.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://themeboy.com/
5
  Description: Add Gutenberg support to SportsPress.
6
  Author: ThemeBoy
7
  Author URI: http://themeboy.com/
8
- Version: 2.6.9
9
  */
10
 
11
  // Exit if accessed directly
@@ -17,7 +17,7 @@ if ( ! class_exists( 'SportsPress_Gutenberg' ) ) :
17
  * Main SportsPress Gutenberg Class
18
  *
19
  * @class SportsPress_Gutenberg
20
- * @version 2.6.9
21
  */
22
  class SportsPress_Gutenberg {
23
 
@@ -29,6 +29,7 @@ class SportsPress_Gutenberg {
29
  $this->define_constants();
30
 
31
  add_filter( 'gutenberg_can_edit_post_type', array( $this, 'can_edit_post_type' ), 10, 2 );
 
32
  }
33
 
34
  /**
@@ -36,7 +37,7 @@ class SportsPress_Gutenberg {
36
  */
37
  private function define_constants() {
38
  if ( !defined( 'SP_GUTENBERG_VERSION' ) )
39
- define( 'SP_GUTENBERG_VERSION', '2.6.9' );
40
 
41
  if ( !defined( 'SP_GUTENBERG_URL' ) )
42
  define( 'SP_GUTENBERG_URL', plugin_dir_url( __FILE__ ) );
5
  Description: Add Gutenberg support to SportsPress.
6
  Author: ThemeBoy
7
  Author URI: http://themeboy.com/
8
+ Version: 2.6.13
9
  */
10
 
11
  // Exit if accessed directly
17
  * Main SportsPress Gutenberg Class
18
  *
19
  * @class SportsPress_Gutenberg
20
+ * @version 2.6.13
21
  */
22
  class SportsPress_Gutenberg {
23
 
29
  $this->define_constants();
30
 
31
  add_filter( 'gutenberg_can_edit_post_type', array( $this, 'can_edit_post_type' ), 10, 2 );
32
+ add_filter( 'use_block_editor_for_post_type', array( $this, 'can_edit_post_type' ), 10, 2 );
33
  }
34
 
35
  /**
37
  */
38
  private function define_constants() {
39
  if ( !defined( 'SP_GUTENBERG_VERSION' ) )
40
+ define( 'SP_GUTENBERG_VERSION', '2.6.13' );
41
 
42
  if ( !defined( 'SP_GUTENBERG_URL' ) )
43
  define( 'SP_GUTENBERG_URL', plugin_dir_url( __FILE__ ) );
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.12
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.12 =
241
  * Tweak - Match styling of date row in countdown.
242
  * Fix - Calculated totals in player performance array missing for custom templates.
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 5.0
7
+ Stable tag: 2.6.13
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
237
 
238
  == Changelog ==
239
 
240
+ = 2.6.13 =
241
+ * Fix - Missing functionality with Gutenberg enabled.
242
+ * Fix - Enable API endpoints with WordPress 5.0 and Gutenberg.
243
+
244
  = 2.6.12 =
245
  * Tweak - Match styling of date row in countdown.
246
  * Fix - Calculated totals in player performance array missing for custom templates.
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.12
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.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
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.13
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.13
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
+ public $version = '2.6.13';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class