My Calendar - Version 3.3.7

Version Description

  • Bug fix: Fixes location admin verification error in manage locations list.
Download this release

Release Info

Developer joedolson
Plugin Icon 128x128 My Calendar
Version 3.3.7
Comparing to
See all releases

Code changes from version 3.3.6 to 3.3.7

my-calendar-location-manager.php CHANGED
@@ -296,11 +296,15 @@ function mc_manage_locations() {
296
  * @return bool
297
  */
298
  function mc_verify_location( $location ) {
 
 
 
299
  $location_id = $location->location_id;
 
300
  // Unset location ID and location Post, which will always exist.
301
- $location->location_id = '';
302
- $location->location_post = '';
303
- $json = json_encode( $location );
304
  if ( '{"location_id":"","location_label":"","location_street":"","location_street2":"","location_city":"","location_state":"","location_postcode":"","location_region":"","location_url":"","location_country":"","location_longitude":"0.000000","location_latitude":"0.000000","location_zoom":"16","location_phone":"","location_phone2":"","location_access":"","location_post":""}' === $json ) {
305
  if ( $location_id ) {
306
  mc_delete_location( $location_id );
296
  * @return bool
297
  */
298
  function mc_verify_location( $location ) {
299
+ if ( ! is_object( $location ) ) {
300
+ return true;
301
+ }
302
  $location_id = $location->location_id;
303
+ $copy = clone $location;
304
  // Unset location ID and location Post, which will always exist.
305
+ $copy->location_id = '';
306
+ $copy->location_post = '';
307
+ $json = json_encode( $copy );
308
  if ( '{"location_id":"","location_label":"","location_street":"","location_street2":"","location_city":"","location_state":"","location_postcode":"","location_region":"","location_url":"","location_country":"","location_longitude":"0.000000","location_latitude":"0.000000","location_zoom":"16","location_phone":"","location_phone2":"","location_access":"","location_post":""}' === $json ) {
309
  if ( $location_id ) {
310
  mc_delete_location( $location_id );
my-calendar-locations.php CHANGED
@@ -318,7 +318,7 @@ function mc_modify_location( $update, $where ) {
318
  */
319
  function mc_delete_location( $location ) {
320
  global $wpdb;
321
- $location = (int) ( isset( $_GET['location_id'] ) ) ? $_GET['location_id'] : $location;
322
  $results = $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . my_calendar_locations_table() . ' WHERE location_id=%d', $location ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
323
  do_action( 'mc_delete_location', $results, $location );
324
  if ( $results ) {
318
  */
319
  function mc_delete_location( $location ) {
320
  global $wpdb;
321
+ $location = (int) ( ( isset( $_GET['location_id'] ) ) ? $_GET['location_id'] : $location );
322
  $results = $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . my_calendar_locations_table() . ' WHERE location_id=%d', $location ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared
323
  do_action( 'mc_delete_location', $results, $location );
324
  if ( $results ) {
my-calendar.php CHANGED
@@ -17,7 +17,7 @@
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
- * Version: 3.3.6
21
  */
22
 
23
  /*
@@ -42,7 +42,7 @@ if ( ! defined( 'ABSPATH' ) ) {
42
  }
43
 
44
  global $mc_version, $wpdb;
45
- $mc_version = '3.3.6';
46
 
47
  define( 'MC_DEBUG', false );
48
 
17
  * License: GPL-2.0+
18
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
19
  * Domain Path: lang
20
+ * Version: 3.3.7
21
  */
22
 
23
  /*
42
  }
43
 
44
  global $mc_version, $wpdb;
45
+ $mc_version = '3.3.7';
46
 
47
  define( 'MC_DEBUG', false );
48
 
readme.txt CHANGED
@@ -6,7 +6,7 @@ Requires at least: 4.4
6
  Tested up to: 5.9
7
  Requires PHP: 7.0
8
  Text domain: my-calendar
9
- Stable tag: 3.3.6
10
  License: GPLv2 or later
11
 
12
  Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
@@ -84,6 +84,10 @@ Translating my plugins is always appreciated. Visit <a href="https://translate.w
84
 
85
  == Changelog ==
86
 
 
 
 
 
87
  = 3.3.6 =
88
 
89
  * Bug fix: Event template previews should only show to users who can use them.
6
  Tested up to: 5.9
7
  Requires PHP: 7.0
8
  Text domain: my-calendar
9
+ Stable tag: 3.3.7
10
  License: GPLv2 or later
11
 
12
  Accessible WordPress event calendar plugin. Show events from multiple calendars on pages, in posts, or in widgets.
84
 
85
  == Changelog ==
86
 
87
+ = 3.3.7 =
88
+
89
+ * Bug fix: Fixes location admin verification error in manage locations list.
90
+
91
  = 3.3.6 =
92
 
93
  * Bug fix: Event template previews should only show to users who can use them.