The Events Calendar - Version 5.4.0.2

Version Description

= [5.0] =

Please see the changelog for the complete list of changes in this release. Previous versions of The Events Calendar are not cross-compatible with 5.X add-ons. Remember to always make a backup of your database and files before updating!

Download this release

Release Info

Developer bordoni
Plugin Icon The Events Calendar
Version 5.4.0.2
Comparing to
See all releases

Code changes from version 5.4.0.1 to 5.4.0.2

common/vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit3b1569ccb32e105d5b5c943c9a53d525::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite0a2325a0c4af72c150bb1561cebce0a::getLoader();
common/vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit692348472cf64c722b8175b1570fcf54::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInitb79b2a6396f989d596b5d39571fdea70::getLoader();
common/vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit3b1569ccb32e105d5b5c943c9a53d525
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit3b1569ccb32e105d5b5c943c9a53d525
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit3b1569ccb32e105d5b5c943c9a53d525', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit3b1569ccb32e105d5b5c943c9a53d525', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite0a2325a0c4af72c150bb1561cebce0a
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInite0a2325a0c4af72c150bb1561cebce0a', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInite0a2325a0c4af72c150bb1561cebce0a', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInite0a2325a0c4af72c150bb1561cebce0a::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
common/vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit692348472cf64c722b8175b1570fcf54 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit692348472cf64c722b8175b1570fcf54 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit692348472cf64c722b8175b1570fcf54', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit692348472cf64c722b8175b1570fcf54', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInitb79b2a6396f989d596b5d39571fdea70 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitb79b2a6396f989d596b5d39571fdea70', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitb79b2a6396f989d596b5d39571fdea70', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
common/vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
@@ -228,10 +228,10 @@ class ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525
228
  public static function getInitializer(ClassLoader $loader)
229
  {
230
  return \Closure::bind(function () use ($loader) {
231
- $loader->prefixLengthsPsr4 = ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525::$prefixLengthsPsr4;
232
- $loader->prefixDirsPsr4 = ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525::$prefixDirsPsr4;
233
- $loader->prefixesPsr0 = ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525::$prefixesPsr0;
234
- $loader->classMap = ComposerStaticInit3b1569ccb32e105d5b5c943c9a53d525::$classMap;
235
 
236
  }, null, ClassLoader::class);
237
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite0a2325a0c4af72c150bb1561cebce0a
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
228
  public static function getInitializer(ClassLoader $loader)
229
  {
230
  return \Closure::bind(function () use ($loader) {
231
+ $loader->prefixLengthsPsr4 = ComposerStaticInite0a2325a0c4af72c150bb1561cebce0a::$prefixLengthsPsr4;
232
+ $loader->prefixDirsPsr4 = ComposerStaticInite0a2325a0c4af72c150bb1561cebce0a::$prefixDirsPsr4;
233
+ $loader->prefixesPsr0 = ComposerStaticInite0a2325a0c4af72c150bb1561cebce0a::$prefixesPsr0;
234
+ $loader->classMap = ComposerStaticInite0a2325a0c4af72c150bb1561cebce0a::$classMap;
235
 
236
  }, null, ClassLoader::class);
237
  }
lang/the-events-calendar-da_DK.mo CHANGED
Binary file
lang/the-events-calendar-de_DE.mo CHANGED
Binary file
lang/the-events-calendar-en_CA.mo CHANGED
Binary file
lang/the-events-calendar-es_ES.mo CHANGED
Binary file
lang/the-events-calendar-it_IT.mo CHANGED
Binary file
lang/the-events-calendar-ja.mo CHANGED
Binary file
lang/the-events-calendar-tr_TR.mo CHANGED
Binary file
lang/the-events-calendar.pot CHANGED
@@ -5,11 +5,11 @@ msgstr ""
5
  "Project-Id-Version: The Events Calendar 5.4.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/the-events-"
7
  "calendar\n"
8
- "POT-Creation-Date: 2021-03-04 19:03:14+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2021-03-04 19:03\n"
13
  "Last-Translator: \n"
14
  "Language-Team: \n"
15
 
5
  "Project-Id-Version: The Events Calendar 5.4.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/the-events-"
7
  "calendar\n"
8
+ "POT-Creation-Date: 2021-02-24 19:03:14+00:00\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2021-02-24 19:03\n"
13
  "Last-Translator: \n"
14
  "Language-Team: \n"
15
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: theeventscalendar, borkweb, bordoni, brianjessee, aguseo, camwynsp
4
  Tags: events, calendar, event, schedule, organizer
5
  Donate link: https://evnt.is/29
6
  Requires at least: 4.9.14
7
- Stable tag: 5.4.0.1
8
  Tested up to: 5.7.0
9
  Requires PHP: 5.6
10
  License: GPLv2 or later
@@ -222,6 +222,10 @@ Remember to always make a backup of your database and files before updating!
222
 
223
  == Changelog ==
224
 
 
 
 
 
225
  = [5.4.0.1] 2021-03-04 =
226
 
227
  * Fix - Prevent fatals happening with PHP 5.6 due to duplicated class for templates [BTRIA-767]
4
  Tags: events, calendar, event, schedule, organizer
5
  Donate link: https://evnt.is/29
6
  Requires at least: 4.9.14
7
+ Stable tag: 5.4.0.2
8
  Tested up to: 5.7.0
9
  Requires PHP: 5.6
10
  License: GPLv2 or later
222
 
223
  == Changelog ==
224
 
225
+ = [5.4.0.2] 2021-03-10 =
226
+
227
+ * Fix - Saving organizers properly work on WordPress 5.7 with Blocks Editor [TEC-3788]
228
+
229
  = [5.4.0.1] 2021-03-04 =
230
 
231
  * Fix - Prevent fatals happening with PHP 5.6 due to duplicated class for templates [BTRIA-767]
src/Tribe/Editor/Meta.php CHANGED
@@ -1,6 +1,7 @@
1
  <?php
2
 
3
  use Tribe__Date_Utils as Date;
 
4
 
5
  /**
6
  * Initialize Gutenberg Event Meta fields
@@ -21,6 +22,7 @@ class Tribe__Events__Editor__Meta extends Tribe__Editor__Meta {
21
  $post_type = Tribe__Events__Main::POSTTYPE;
22
  add_filter( "rest_prepare_{$post_type}", [ $this, 'meta_backwards_compatibility' ], 10, 3 );
23
  add_filter( "rest_after_insert_{$post_type}", [ $this, 'add_utc_dates' ], 10, 2 );
 
24
 
25
  register_meta( 'post', '_EventAllDay', $this->boolean() );
26
  register_meta( 'post', '_EventTimezone', $this->text() );
@@ -72,7 +74,7 @@ class Tribe__Events__Editor__Meta extends Tribe__Editor__Meta {
72
  'post',
73
  '_EventVenueID',
74
  [
75
- 'description' => __( 'Event Organizers', 'the-events-calendar' ),
76
  'auth_callback' => [ $this, 'auth_callback' ],
77
  'sanitize_callback' => 'absint',
78
  'type' => 'integer',
@@ -99,6 +101,61 @@ class Tribe__Events__Editor__Meta extends Tribe__Editor__Meta {
99
  register_meta( 'post', '_VenueLng', $this->text() );
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  /**
103
  * Make sure we make the REST response backwards compatible.
104
  *
1
  <?php
2
 
3
  use Tribe__Date_Utils as Date;
4
+ use Tribe__Events__Main as TEC;
5
 
6
  /**
7
  * Initialize Gutenberg Event Meta fields
22
  $post_type = Tribe__Events__Main::POSTTYPE;
23
  add_filter( "rest_prepare_{$post_type}", [ $this, 'meta_backwards_compatibility' ], 10, 3 );
24
  add_filter( "rest_after_insert_{$post_type}", [ $this, 'add_utc_dates' ], 10, 2 );
25
+ add_filter( 'delete_post_metadata', [ $this, 'filter_allow_meta_delete_non_existent_key' ], 15, 5 );
26
 
27
  register_meta( 'post', '_EventAllDay', $this->boolean() );
28
  register_meta( 'post', '_EventTimezone', $this->text() );
74
  'post',
75
  '_EventVenueID',
76
  [
77
+ 'description' => __( 'Event Venue', 'the-events-calendar' ),
78
  'auth_callback' => [ $this, 'auth_callback' ],
79
  'sanitize_callback' => 'absint',
80
  'type' => 'integer',
101
  register_meta( 'post', '_VenueLng', $this->text() );
102
  }
103
 
104
+ /**
105
+ * Short-circuits deleting metadata items that dont exist, for compatibility purposes we need to make sure
106
+ * WordPress doesn't throw an error when the meta is not present.
107
+ *
108
+ * @since TBD
109
+ *
110
+ * @param null|bool $delete Whether to allow metadata deletion of the given type.
111
+ * @param int $object_id ID of the object metadata is for.
112
+ * @param string $meta_key Metadata key.
113
+ * @param mixed $meta_value Metadata value. Must be serializable if non-scalar.
114
+ * @param bool $delete_all Whether to delete the matching metadata entries
115
+ * for all objects, ignoring the specified $object_id.
116
+ * Default false.
117
+ *
118
+ * @return bool
119
+ */
120
+ public function filter_allow_meta_delete_non_existent_key( $delete, $object_id, $meta_key, $meta_value, $delete_all ) {
121
+ if ( ! empty( $meta_value ) ) {
122
+ return $delete;
123
+ }
124
+
125
+ $meta_keys_to_allow = [
126
+ '_EventOrganizerID' => true,
127
+ '_EventVenueID' => true,
128
+ ];
129
+
130
+ if ( ! isset( $meta_keys_to_allow[ $meta_key ] ) ) {
131
+ return $delete;
132
+ }
133
+
134
+ if ( ! function_exists( 'wp_is_json_request' ) || ! wp_is_json_request() ) {
135
+ return $delete;
136
+ }
137
+
138
+ global $wp;
139
+
140
+ $current_url = home_url( $wp->request );
141
+ $allowed_rest_url = rest_url( 'wp/v2/' . TEC::POSTTYPE );
142
+
143
+ // Only this overwrite on the Tribe Events Endpoint.
144
+ if ( false === strpos( $current_url, $allowed_rest_url ) ) {
145
+ return $delete;
146
+ }
147
+
148
+ $current_value = array_filter( get_post_meta( $object_id, $meta_key ) );
149
+
150
+ // Let the WP method run it's course, if we have a value.
151
+ if ( ! empty( $current_value ) ) {
152
+ return $delete;
153
+ }
154
+
155
+ // If we got to this point we allow the deletion without caring about the value.
156
+ return true;
157
+ }
158
+
159
  /**
160
  * Make sure we make the REST response backwards compatible.
161
  *
src/Tribe/Main.php CHANGED
@@ -32,7 +32,7 @@ if ( ! class_exists( 'Tribe__Events__Main' ) ) {
32
  const VENUE_POST_TYPE = 'tribe_venue';
33
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
34
 
35
- const VERSION = '5.4.0.1';
36
 
37
  /**
38
  * Min Pro Addon
32
  const VENUE_POST_TYPE = 'tribe_venue';
33
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
34
 
35
+ const VERSION = '5.4.0.2';
36
 
37
  /**
38
  * Min Pro Addon
the-events-calendar.php CHANGED
@@ -2,7 +2,7 @@
2
  /**
3
  * Plugin Name: The Events Calendar
4
  * Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
5
- * Version: 5.4.0.1
6
  * Author: The Events Calendar
7
  * Author URI: https://evnt.is/1x
8
  * Text Domain: the-events-calendar
@@ -10,6 +10,7 @@
10
  *
11
  * @package TEC
12
  */
 
13
  /**
14
  * Copyright 2009-2012 by Modern Tribe Inc and the contributors
15
  *
2
  /**
3
  * Plugin Name: The Events Calendar
4
  * Description: The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events. Beautiful. Solid. Awesome.
5
+ * Version: 5.4.0.2
6
  * Author: The Events Calendar
7
  * Author URI: https://evnt.is/1x
8
  * Text Domain: the-events-calendar
10
  *
11
  * @package TEC
12
  */
13
+
14
  /**
15
  * Copyright 2009-2012 by Modern Tribe Inc and the contributors
16
  *
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit042bce8c87bf74f8621b096ff524e597::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit6ffe2008adf5d874f7bab8753ddb4ea8::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit042bce8c87bf74f8621b096ff524e597
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit042bce8c87bf74f8621b096ff524e597
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit042bce8c87bf74f8621b096ff524e597', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit042bce8c87bf74f8621b096ff524e597', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit042bce8c87bf74f8621b096ff524e597::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit6ffe2008adf5d874f7bab8753ddb4ea8
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit6ffe2008adf5d874f7bab8753ddb4ea8', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit6ffe2008adf5d874f7bab8753ddb4ea8', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit6ffe2008adf5d874f7bab8753ddb4ea8::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit042bce8c87bf74f8621b096ff524e597
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
@@ -96,9 +96,9 @@ class ComposerStaticInit042bce8c87bf74f8621b096ff524e597
96
  public static function getInitializer(ClassLoader $loader)
97
  {
98
  return \Closure::bind(function () use ($loader) {
99
- $loader->prefixLengthsPsr4 = ComposerStaticInit042bce8c87bf74f8621b096ff524e597::$prefixLengthsPsr4;
100
- $loader->prefixDirsPsr4 = ComposerStaticInit042bce8c87bf74f8621b096ff524e597::$prefixDirsPsr4;
101
- $loader->classMap = ComposerStaticInit042bce8c87bf74f8621b096ff524e597::$classMap;
102
 
103
  }, null, ClassLoader::class);
104
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit6ffe2008adf5d874f7bab8753ddb4ea8
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'T' =>
96
  public static function getInitializer(ClassLoader $loader)
97
  {
98
  return \Closure::bind(function () use ($loader) {
99
+ $loader->prefixLengthsPsr4 = ComposerStaticInit6ffe2008adf5d874f7bab8753ddb4ea8::$prefixLengthsPsr4;
100
+ $loader->prefixDirsPsr4 = ComposerStaticInit6ffe2008adf5d874f7bab8753ddb4ea8::$prefixDirsPsr4;
101
+ $loader->classMap = ComposerStaticInit6ffe2008adf5d874f7bab8753ddb4ea8::$classMap;
102
 
103
  }, null, ClassLoader::class);
104
  }