SportsPress – Sports Club & League Manager - Version 2.6.7

Version Description

  • Fix - Update Google Maps API endpoints.
Download this release

Release Info

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

Code changes from version 2.6.5 to 2.6.7

changelog.txt CHANGED
@@ -1,5 +1,11 @@
1
  == SportsPress Changelog ==
2
 
 
 
 
 
 
 
3
  = 2.6.5 =
4
  * Tweak - Increase coverage of reverse teams option.
5
  * Tweak - Improve sorting of leagues, positions, and seasons.
1
  == SportsPress Changelog ==
2
 
3
+ = 2.6.7 =
4
+ * Fix - Update Google Maps API endpoints.
5
+
6
+ = 2.6.6 =
7
+ * Fix - Apply reverse teams to frontend templates only.
8
+
9
  = 2.6.5 =
10
  * Tweak - Increase coverage of reverse teams option.
11
  * Tweak - Improve sorting of leagues, positions, and seasons.
includes/admin/class-sp-admin-assets.php CHANGED
@@ -5,7 +5,7 @@
5
  * @author ThemeBoy
6
  * @category Admin
7
  * @package SportsPress/Admin
8
- * @version 2.6.5
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -86,7 +86,7 @@ class SP_Admin_Assets {
86
 
87
  wp_register_script( 'jquery-fitvids', SP()->plugin_url() . '/assets/js/jquery.fitvids.js', array( 'jquery' ), '1.1', true );
88
 
89
- wp_register_script( 'google-maps', '//maps.googleapis.com/maps/api/js?key=AIzaSyAWyt_AG0k_Pgz4LuegtHwesA_OMRnSSAE&libraries=places' );
90
 
91
  wp_register_script( 'jquery-locationpicker', SP()->plugin_url() . '/assets/js/locationpicker.jquery.js', array( 'jquery', 'google-maps' ), '0.1.6', true );
92
 
5
  * @author ThemeBoy
6
  * @category Admin
7
  * @package SportsPress/Admin
8
+ * @version 2.6.7
9
  */
10
 
11
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
86
 
87
  wp_register_script( 'jquery-fitvids', SP()->plugin_url() . '/assets/js/jquery.fitvids.js', array( 'jquery' ), '1.1', true );
88
 
89
+ wp_register_script( 'google-maps', '//tboy.co/maps_js' );
90
 
91
  wp_register_script( 'jquery-locationpicker', SP()->plugin_url() . '/assets/js/locationpicker.jquery.js', array( 'jquery', 'google-maps' ), '0.1.6', true );
92
 
includes/admin/class-sp-admin-setup-wizard.php CHANGED
@@ -9,7 +9,7 @@
9
  * @author WooThemes
10
  * @category Admin
11
  * @package SportsPress/Admin
12
- * @version 2.5.5
13
  */
14
  if ( ! defined( 'ABSPATH' ) ) {
15
  exit;
@@ -101,7 +101,7 @@ class SP_Admin_Setup_Wizard {
101
 
102
  wp_register_script( 'chosen', SP()->plugin_url() . '/assets/js/chosen.jquery.min.js', array( 'jquery' ), '1.1.0', true );
103
  wp_register_script( 'jquery-tiptip', SP()->plugin_url() . '/assets/js/jquery.tipTip.min.js', array( 'jquery' ), '1.3', true );
104
- wp_register_script( 'google-maps', '//maps.googleapis.com/maps/api/js?key=AIzaSyAWyt_AG0k_Pgz4LuegtHwesA_OMRnSSAE&libraries=places' );
105
  wp_register_script( 'sportspress-setup', SP()->plugin_url() . '/assets/js/admin/sportspress-setup.js', array( 'jquery', 'chosen', 'jquery-tiptip' ), SP_VERSION, true );
106
 
107
  wp_register_script( 'jquery-locationpicker', SP()->plugin_url() . '/assets/js/locationpicker.jquery.js', array( 'jquery', 'google-maps' ), '0.1.6', true );
9
  * @author WooThemes
10
  * @category Admin
11
  * @package SportsPress/Admin
12
+ * @version 2.6.7
13
  */
14
  if ( ! defined( 'ABSPATH' ) ) {
15
  exit;
101
 
102
  wp_register_script( 'chosen', SP()->plugin_url() . '/assets/js/chosen.jquery.min.js', array( 'jquery' ), '1.1.0', true );
103
  wp_register_script( 'jquery-tiptip', SP()->plugin_url() . '/assets/js/jquery.tipTip.min.js', array( 'jquery' ), '1.3', true );
104
+ wp_register_script( 'google-maps', '//tboy.co/maps_js' );
105
  wp_register_script( 'sportspress-setup', SP()->plugin_url() . '/assets/js/admin/sportspress-setup.js', array( 'jquery', 'chosen', 'jquery-tiptip' ), SP_VERSION, true );
106
 
107
  wp_register_script( 'jquery-locationpicker', SP()->plugin_url() . '/assets/js/locationpicker.jquery.js', array( 'jquery', 'google-maps' ), '0.1.6', true );
includes/class-sp-event.php CHANGED
@@ -5,7 +5,7 @@
5
  * The SportsPress event class handles individual event data.
6
  *
7
  * @class SP_Event
8
- * @version 2.6.5
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
@@ -89,10 +89,6 @@ class SP_Event extends SP_Custom_Post{
89
 
90
  public function performance( $admin = false ) {
91
  $teams = get_post_meta( $this->ID, 'sp_team', false );
92
- if ( 'yes' === get_option( 'sportspress_event_reverse_teams', 'no' ) ) {
93
- $teams = array_reverse( $teams, true );
94
- }
95
-
96
  $performance = (array)get_post_meta( $this->ID, 'sp_players', true );
97
 
98
  $args = array(
5
  * The SportsPress event class handles individual event data.
6
  *
7
  * @class SP_Event
8
+ * @version 2.6.6
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
89
 
90
  public function performance( $admin = false ) {
91
  $teams = get_post_meta( $this->ID, 'sp_team', false );
 
 
 
 
92
  $performance = (array)get_post_meta( $this->ID, 'sp_players', true );
93
 
94
  $args = array(
includes/class-sp-league-table.php CHANGED
@@ -5,7 +5,7 @@
5
  * The SportsPress league table class handles individual league table data.
6
  *
7
  * @class SP_League_Table
8
- * @version 2.6.5
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
@@ -550,12 +550,6 @@ class SP_League_Table extends SP_Secondary_Post {
550
  $totals[ $team_id ]['last10'] = $last10;
551
  endforeach;
552
 
553
- // Reverse home and away records when "Reverse Teams" is enabled.
554
- $reverse_teams = get_option( 'sportspress_event_reverse_teams', 'no' ) === 'yes' ? true : false;
555
- if ( $reverse_teams ) {
556
- list( $homerecords, $awayrecords ) = array( $awayrecords, $homerecords );
557
- }
558
-
559
  foreach ( $homerecords as $team_id => $homerecord ):
560
  // Add home record to totals
561
  $totals[ $team_id ]['homerecord'] = $homerecord;
5
  * The SportsPress league table class handles individual league table data.
6
  *
7
  * @class SP_League_Table
8
+ * @version 2.6.6
9
  * @package SportsPress/Classes
10
  * @category Class
11
  * @author ThemeBoy
550
  $totals[ $team_id ]['last10'] = $last10;
551
  endforeach;
552
 
 
 
 
 
 
 
553
  foreach ( $homerecords as $team_id => $homerecord ):
554
  // Add home record to totals
555
  $totals[ $team_id ]['homerecord'] = $homerecord;
includes/sp-api-functions.php CHANGED
@@ -7,7 +7,7 @@
7
  * @author ThemeBoy
8
  * @category Core
9
  * @package SportsPress/Functions
10
- * @version 2.6.5
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -111,11 +111,7 @@ function sp_get_main_result_option() {
111
 
112
  function sp_get_main_results( $post = 0 ) {
113
  $event = new SP_Event( $post );
114
- $results = $event->main_results();
115
- if ( is_array( $results ) && get_option( 'sportspress_event_reverse_teams' ) === 'yes' ) {
116
- $results = array_reverse( $results );
117
- }
118
- return $results;
119
  }
120
 
121
  function sp_the_main_results( $post = 0, $delimiter = '-' ) {
7
  * @author ThemeBoy
8
  * @category Core
9
  * @package SportsPress/Functions
10
+ * @version 2.6.6
11
  */
12
 
13
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
111
 
112
  function sp_get_main_results( $post = 0 ) {
113
  $event = new SP_Event( $post );
114
+ return $event->main_results();
 
 
 
 
115
  }
116
 
117
  function sp_the_main_results( $post = 0, $delimiter = '-' ) {
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === SportsPress - Sports Club & League Manager ===
2
- Contributors: ThemeBoy, brianmiyaji, aylaview, savvasha, kadimi
3
  Tags: calendars, club, club management, esports, events, fixtures, leagues, league management, sports, sports club, sports data, team rosters
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
- Stable tag: 2.6.5
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.5 =
241
  * Tweak - Increase coverage of reverse teams option.
242
  * Tweak - Improve sorting of leagues, positions, and seasons.
@@ -666,4 +672,4 @@ When you upgrade to one of the SportsPress Pro licenses, you can simply activate
666
  * Preset - Update baseball, cricket, floorball, handball, ice hockey, and softball presets.
667
 
668
  = Full Changelog =
669
- * For older versions, [view the full changelog](https://github.com/ThemeBoy/SportsPress/blob/master/changelog.txt).
1
  === SportsPress - Sports Club & League Manager ===
2
+ Contributors: ThemeBoy, brianmiyaji, aylaview, savvasha, nabil_kadimi
3
  Tags: calendars, club, club management, esports, events, fixtures, leagues, league management, sports, sports club, sports data, team rosters
4
  Donate link: http://tboy.co/donate
5
  Requires at least: 3.8
6
  Tested up to: 4.9
7
+ Stable tag: 2.6.7
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
237
 
238
  == Changelog ==
239
 
240
+ = 2.6.7 =
241
+ * Fix - Update Google Maps API endpoints.
242
+
243
+ = 2.6.6 =
244
+ * Fix - Apply reverse teams to frontend templates only.
245
+
246
  = 2.6.5 =
247
  * Tweak - Increase coverage of reverse teams option.
248
  * Tweak - Improve sorting of leagues, positions, and seasons.
672
  * Preset - Update baseball, cricket, floorball, handball, ice hockey, and softball presets.
673
 
674
  = Full Changelog =
675
+ * For older versions, [view the full changelog](https://github.com/ThemeBoy/SportsPress/blob/master/changelog.txt).
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.5
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.5
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
- public $version = '2.6.5';
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.7
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.7
30
  */
31
  final class SportsPress {
32
 
33
  /**
34
  * @var string
35
  */
36
+ public $version = '2.6.7';
37
 
38
  /**
39
  * @var SportsPress The single instance of the class
templates/venue-map.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
- * @version 2.1.3
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
@@ -30,7 +30,7 @@ if ( $latitude != null && $longitude != null ):
30
  width="600"
31
  height="320"
32
  frameborder="0" style="border:0"
33
- src="https://www.google.com/maps/embed/v1/search?key=AIzaSyAWyt_AG0k_Pgz4LuegtHwesA_OMRnSSAE&amp;q=<?php echo $address; ?>&amp;center=<?php echo $latitude; ?>,<?php echo $longitude; ?>&amp;zoom=<?php echo $zoom; ?>&amp;maptype=<?php echo $maptype; ?>" allowfullscreen>
34
  </iframe>
35
  <?php
36
  endif;
4
  *
5
  * @author ThemeBoy
6
  * @package SportsPress/Templates
7
+ * @version 2.6.7
8
  */
9
 
10
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
30
  width="600"
31
  height="320"
32
  frameborder="0" style="border:0"
33
+ src="//tboy.co/maps_embed?q=<?php echo $address; ?>&amp;center=<?php echo $latitude; ?>,<?php echo $longitude; ?>&amp;zoom=<?php echo $zoom; ?>&amp;maptype=<?php echo $maptype; ?>" allowfullscreen>
34
  </iframe>
35
  <?php
36
  endif;