The Events Calendar - Version 4.6.24.1

Version Description

Download this release

Release Info

Developer ModernTribe
Plugin Icon The Events Calendar
Version 4.6.24.1
Comparing to
See all releases

Code changes from version 4.6.24 to 4.6.24.1

lang/the-events-calendar-cs_CZ.mo CHANGED
Binary file
lang/the-events-calendar-cs_CZ.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Plugins - The Events Calendar - Stable (latest release) package.
3
  msgid ""
4
  msgstr ""
5
- "PO-Revision-Date: 2018-09-03 08:18:30+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -938,7 +938,7 @@ msgstr ""
938
  #: src/Tribe/REST/V1/Endpoints/Single_Organizer.php:291
939
  #: src/Tribe/REST/V1/Endpoints/Single_Venue.php:310
940
  msgid "The organizer featured image ID or URL"
941
- msgstr ""
942
 
943
  #: src/Tribe/REST/V1/Endpoints/Single_Organizer.php:284
944
  msgid "The organizer e-mail address"
@@ -1038,7 +1038,7 @@ msgstr ""
1038
 
1039
  #: src/Tribe/REST/V1/Endpoints/Single_Event.php:287
1040
  msgid "The event featured image ID or URL"
1041
- msgstr ""
1042
 
1043
  #: src/Tribe/REST/V1/Endpoints/Single_Event.php:281
1044
  msgid "The event end date and time"
@@ -1556,7 +1556,7 @@ msgstr ""
1556
 
1557
  #: src/Tribe/Customizer/General_Theme.php:311
1558
  msgid "Featured Highlight Color"
1559
- msgstr ""
1560
 
1561
  #: src/Tribe/Aggregator/Service.php:230
1562
  msgid "The response from the Event Aggregator server was badly formed and could not be understood. Please try again."
@@ -2450,17 +2450,17 @@ msgstr "Klíčové slovo"
2450
  #: src/functions/template-tags/loop.php:177
2451
  msgctxt "featured events title"
2452
  msgid "Featured %s"
2453
- msgstr ""
2454
 
2455
  #: src/admin-views/widget-admin-list.php:35
2456
  msgctxt "events list widget setting"
2457
  msgid "Limit to featured events only"
2458
- msgstr ""
2459
 
2460
  #: src/admin-views/events-meta-box.php:99
2461
  msgctxt "Start Date Time \"to\" End Date Time"
2462
  msgid "to"
2463
- msgstr ""
2464
 
2465
  #: src/admin-views/aggregator/fields/schedule.php:79
2466
  #: src/admin-views/events-meta-box.php:97
@@ -2474,12 +2474,12 @@ msgstr "Začátek/Konec:"
2474
 
2475
  #: src/admin-views/event-sidebar-options.php:33
2476
  msgid "Featured events are highlighted on the front end in views, archives, and widgets."
2477
- msgstr ""
2478
 
2479
  #: src/Tribe/Importer/Column_Mapper.php:75
2480
  #: src/admin-views/event-sidebar-options.php:31
2481
  msgid "Feature Event"
2482
- msgstr ""
2483
 
2484
  #: src/admin-views/create-venue-fields.php:257
2485
  msgid "Show Google Map Link?"
@@ -2521,7 +2521,7 @@ msgstr "Export akcí"
2521
  #: src/Tribe/Main.php:762
2522
  msgctxt "featured events slug"
2523
  msgid "featured"
2524
- msgstr ""
2525
 
2526
  #: src/Tribe/Linked_Posts.php:1133
2527
  msgid "Create: <b><%= term %></b>"
@@ -2537,7 +2537,7 @@ msgstr "Datum akce:"
2537
 
2538
  #: src/Tribe/Customizer/Widget.php:132
2539
  msgid "Show Featured Event Images"
2540
- msgstr ""
2541
 
2542
  #: src/Tribe/Customizer/Widget.php:113
2543
  msgid "Calendar Date Bar Color"
@@ -2642,7 +2642,7 @@ msgstr ""
2642
 
2643
  #: src/Tribe/Customizer/General_Theme.php:334
2644
  msgid "If the Featured highlight color is set to Custom, the following color will be used:"
2645
- msgstr ""
2646
 
2647
  #: src/Tribe/Customizer/General_Theme.php:291
2648
  msgid "Accent Color"
@@ -2950,7 +2950,7 @@ msgstr "Všechny %s"
2950
 
2951
  #: src/admin-views/widget-admin-list.php:41
2952
  msgid "Generate JSON-LD data"
2953
- msgstr ""
2954
 
2955
  #: src/admin-views/tribe-options-addons-api.php:177
2956
  msgid "Some features and add-ons require you to enter an API key or log into a third-party website so that The Events Calendar can communicate with an outside source."
@@ -5772,7 +5772,7 @@ msgstr "Podrobnosti"
5772
 
5773
  #: src/admin-views/widget-admin-list.php:31
5774
  msgid "Show widget only if there are upcoming events"
5775
- msgstr ""
5776
 
5777
  #: src/admin-views/widget-admin-list.php:18
5778
  msgid "Show:"
2
  # This file is distributed under the same license as the Plugins - The Events Calendar - Stable (latest release) package.
3
  msgid ""
4
  msgstr ""
5
+ "PO-Revision-Date: 2018-10-03 22:36:46+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
938
  #: src/Tribe/REST/V1/Endpoints/Single_Organizer.php:291
939
  #: src/Tribe/REST/V1/Endpoints/Single_Venue.php:310
940
  msgid "The organizer featured image ID or URL"
941
+ msgstr "ID nebo URL náhledového obrázku pořadatele"
942
 
943
  #: src/Tribe/REST/V1/Endpoints/Single_Organizer.php:284
944
  msgid "The organizer e-mail address"
1038
 
1039
  #: src/Tribe/REST/V1/Endpoints/Single_Event.php:287
1040
  msgid "The event featured image ID or URL"
1041
+ msgstr "ID nebo URL náhledového obrázku akce"
1042
 
1043
  #: src/Tribe/REST/V1/Endpoints/Single_Event.php:281
1044
  msgid "The event end date and time"
1556
 
1557
  #: src/Tribe/Customizer/General_Theme.php:311
1558
  msgid "Featured Highlight Color"
1559
+ msgstr "Barva zvýraznění doporučených akcí"
1560
 
1561
  #: src/Tribe/Aggregator/Service.php:230
1562
  msgid "The response from the Event Aggregator server was badly formed and could not be understood. Please try again."
2450
  #: src/functions/template-tags/loop.php:177
2451
  msgctxt "featured events title"
2452
  msgid "Featured %s"
2453
+ msgstr "Doporučené %s"
2454
 
2455
  #: src/admin-views/widget-admin-list.php:35
2456
  msgctxt "events list widget setting"
2457
  msgid "Limit to featured events only"
2458
+ msgstr "Omezit pouze na doporučené akce"
2459
 
2460
  #: src/admin-views/events-meta-box.php:99
2461
  msgctxt "Start Date Time \"to\" End Date Time"
2462
  msgid "to"
2463
+ msgstr "do"
2464
 
2465
  #: src/admin-views/aggregator/fields/schedule.php:79
2466
  #: src/admin-views/events-meta-box.php:97
2474
 
2475
  #: src/admin-views/event-sidebar-options.php:33
2476
  msgid "Featured events are highlighted on the front end in views, archives, and widgets."
2477
+ msgstr "Doporučené akce se na webu barevně zvýrazní u všech zobrazení, widgetů i v archivu."
2478
 
2479
  #: src/Tribe/Importer/Column_Mapper.php:75
2480
  #: src/admin-views/event-sidebar-options.php:31
2481
  msgid "Feature Event"
2482
+ msgstr "Doporučená akce"
2483
 
2484
  #: src/admin-views/create-venue-fields.php:257
2485
  msgid "Show Google Map Link?"
2521
  #: src/Tribe/Main.php:762
2522
  msgctxt "featured events slug"
2523
  msgid "featured"
2524
+ msgstr "doporučeno"
2525
 
2526
  #: src/Tribe/Linked_Posts.php:1133
2527
  msgid "Create: <b><%= term %></b>"
2537
 
2538
  #: src/Tribe/Customizer/Widget.php:132
2539
  msgid "Show Featured Event Images"
2540
+ msgstr "Zobrazit obrázek doporučených akcí"
2541
 
2542
  #: src/Tribe/Customizer/Widget.php:113
2543
  msgid "Calendar Date Bar Color"
2642
 
2643
  #: src/Tribe/Customizer/General_Theme.php:334
2644
  msgid "If the Featured highlight color is set to Custom, the following color will be used:"
2645
+ msgstr "Pokud je barva zvýraznění doporučených akcí nastavena na Vlastní, použije se následující barva:"
2646
 
2647
  #: src/Tribe/Customizer/General_Theme.php:291
2648
  msgid "Accent Color"
2950
 
2951
  #: src/admin-views/widget-admin-list.php:41
2952
  msgid "Generate JSON-LD data"
2953
+ msgstr "Vygenerovat data JSON-LD"
2954
 
2955
  #: src/admin-views/tribe-options-addons-api.php:177
2956
  msgid "Some features and add-ons require you to enter an API key or log into a third-party website so that The Events Calendar can communicate with an outside source."
5772
 
5773
  #: src/admin-views/widget-admin-list.php:31
5774
  msgid "Show widget only if there are upcoming events"
5775
+ msgstr "Zobrazit widget pouze pokud jsou nadcházející akce"
5776
 
5777
  #: src/admin-views/widget-admin-list.php:18
5778
  msgid "Show:"
lang/the-events-calendar-de_DE.mo CHANGED
Binary file
lang/the-events-calendar-sv_SE.mo CHANGED
Binary file
lang/the-events-calendar-sv_SE.po CHANGED
@@ -2,7 +2,7 @@
2
  # This file is distributed under the same license as the Plugins - The Events Calendar - Stable (latest release) package.
3
  msgid ""
4
  msgstr ""
5
- "PO-Revision-Date: 2018-09-04 09:26:59+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -38,7 +38,7 @@ msgstr ""
38
 
39
  #: src/views/month/single-day.php:57
40
  msgid "%s for %s"
41
- msgstr ""
42
 
43
  #: src/views/month/loop-grid.php:25 src/views/month/loop-grid.php:28
44
  msgid "Calendar of %s"
@@ -66,7 +66,7 @@ msgstr ""
66
 
67
  #: src/admin-views/privacy.php:63
68
  msgid "If you have extended our plugin(s) to send data to a third-party service such as Eventbrite, Google Maps, or PayPal, user information may be passed to these external services. These services may be located abroad."
69
- msgstr ""
70
 
71
  #: src/admin-views/privacy.php:61
72
  msgid "Modern Tribe does not send any user data outside of your website by default."
2
  # This file is distributed under the same license as the Plugins - The Events Calendar - Stable (latest release) package.
3
  msgid ""
4
  msgstr ""
5
+ "PO-Revision-Date: 2018-10-05 15:16:04+0000\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
38
 
39
  #: src/views/month/single-day.php:57
40
  msgid "%s for %s"
41
+ msgstr "%s för %s"
42
 
43
  #: src/views/month/loop-grid.php:25 src/views/month/loop-grid.php:28
44
  msgid "Calendar of %s"
66
 
67
  #: src/admin-views/privacy.php:63
68
  msgid "If you have extended our plugin(s) to send data to a third-party service such as Eventbrite, Google Maps, or PayPal, user information may be passed to these external services. These services may be located abroad."
69
+ msgstr "Om du har utökat vårt tillägg för att skicka data till en tredjepartstjänst som Eventbrite, Google Maps eller PayPal, kan användarinformation skickas till dessa externa tjänster. Dessa tjänster kan vara belägna i utlandet."
70
 
71
  #: src/admin-views/privacy.php:61
72
  msgid "Modern Tribe does not send any user data outside of your website by default."
readme.txt CHANGED
@@ -4,7 +4,7 @@ Contributors: ModernTribe, borkweb, barry.hughes, bordoni, brianjessee, aguseo,
4
  Tags: events, calendar, event, venue, organizer, dates, date, google maps, conference, workshop, concert, meeting, seminar, summit, class, modern tribe, tribe, widget
5
  Donate link: http://m.tri.be/29
6
  Requires at least: 4.5
7
- Stable tag: 4.6.24
8
  Tested up to: 4.9.8
9
  Requires PHP: 5.2.4
10
  License: GPLv2 or later
@@ -215,6 +215,12 @@ Still not happy? Shoot us an email to support@theeventscalendar.com or tweet to
215
 
216
  == Changelog ==
217
 
 
 
 
 
 
 
218
  = [4.6.24] 2018-10-03 =
219
 
220
  * Fix - Prevent broken and low-resolution Google Maps if user has not provided a Google Maps API key of their own by providing our own fallback API key [114442]
4
  Tags: events, calendar, event, venue, organizer, dates, date, google maps, conference, workshop, concert, meeting, seminar, summit, class, modern tribe, tribe, widget
5
  Donate link: http://m.tri.be/29
6
  Requires at least: 4.5
7
+ Stable tag: 4.6.24.1
8
  Tested up to: 4.9.8
9
  Requires PHP: 5.2.4
10
  License: GPLv2 or later
215
 
216
  == Changelog ==
217
 
218
+ = [4.6.24.1] 2018-10-08 =
219
+
220
+ * Fix - Fixed an issue where a fatal error could be generated when trying to save a new Event Aggregator scheduled import [115339]
221
+ * Fix - Handle left-over Facebook scheduled imports and notices [114831]
222
+ * Tweak - Added the `tribe_aggregator_import_setting_origins` filter to the origins available for default import settings [115704]
223
+
224
  = [4.6.24] 2018-10-03 =
225
 
226
  * Fix - Prevent broken and low-resolution Google Maps if user has not provided a Google Maps API key of their own by providing our own fallback API key [114442]
src/Tribe/Aggregator/Cron.php CHANGED
@@ -314,6 +314,15 @@ class Tribe__Events__Aggregator__Cron {
314
  continue;
315
  }
316
 
 
 
 
 
 
 
 
 
 
317
  if ( ! $record->is_schedule_time() ) {
318
  tribe( 'logger' )->log_debug( sprintf( 'Record (%d) skipped, not scheduled time', $record->id ), 'EA Cron' );
319
  continue;
314
  continue;
315
  }
316
 
317
+ if ( $record instanceof Tribe__Events__Aggregator__Record__Unsupported ) {
318
+ /**
319
+ * This means the record post exists but the origin is not currently supported.
320
+ * To avoid re-looping on this let's trash this post and continue.
321
+ */
322
+ $record->delete( );
323
+ continue;
324
+ }
325
+
326
  if ( ! $record->is_schedule_time() ) {
327
  tribe( 'logger' )->log_debug( sprintf( 'Record (%d) skipped, not scheduled time', $record->id ), 'EA Cron' );
328
  continue;
src/Tribe/Aggregator/Record/Unsupported.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Models a record for a no longer, or not still, supported origin.
4
+ *
5
+ * Passing around an instance of an unsupported origin record should not break the code.
6
+ *
7
+ * @since TBD
8
+ */
9
+
10
+ /**
11
+ * Class Tribe__Events__Aggregator__Record__Unsupported
12
+ *
13
+ * @since TBD
14
+ */
15
+ class Tribe__Events__Aggregator__Record__Unsupported extends Tribe__Events__Aggregator__Record__Abstract {
16
+ /**
17
+ * Tribe__Events__Aggregator__Record__Unsupported constructor.
18
+ *
19
+ * Overrides the base method to play along nicely for the request context
20
+ * that builds this post and then remove it, if clean is allowed, on `shutdown`.
21
+ *
22
+ * @param int|WP_Post|null $post The record post or post ID.
23
+ */
24
+ public function __construct( $post = null ) {
25
+ parent::__construct( $post );
26
+
27
+ /**
28
+ * Whether unsupported origin records should be removed or not.
29
+ *
30
+ * If set to `true` then the post will be deleted on shutdown.
31
+ *
32
+ * @since TBD
33
+ *
34
+ * @param bool $should_delete Whether the unsupported post should be deleted or not; defaults
35
+ * to `true`.
36
+ * @param self $this This record object.
37
+ * @param WP_Post This record post object.
38
+ */
39
+ $should_delete = apply_filters( 'tribe_aggregator_clean_unsupported', true, $this, $post );
40
+
41
+ if ( $should_delete ) {
42
+ /*
43
+ * Let's delay the deletion to avoid client code from relying on
44
+ * a deleted post for this request.
45
+ */
46
+ add_action( 'shutdown', array( $this, 'delete_post' ) );
47
+ }
48
+ }
49
+
50
+ /**
51
+ * Public facing Label for this Origin
52
+ *
53
+ * @since TBD
54
+ *
55
+ * @return string
56
+ */
57
+ public function get_label() {
58
+ return __( 'Unsupported', 'the-events-calendar' );
59
+ }
60
+
61
+ /**
62
+ * Overrides the base method short-circuiting the check for the
63
+ * schedule time to return false.
64
+ *
65
+ * @since TBD
66
+ *
67
+ * @return bool An indication that it's never time for an unsupported record to run.
68
+ */
69
+ public function is_schedule_time() {
70
+ // It's never time for an unsupported record to run.
71
+ return false;
72
+ }
73
+
74
+ /**
75
+ * Returns the unsupported record hash.
76
+ *
77
+ * The hash is usually built from the record meta; in the case
78
+ * of an unsupported record that's skipped and a default string
79
+ * is returned. Since the hash is usually compared to strings built
80
+ * the same way the returned fixed hash will never match.
81
+ *
82
+ * @since TBD
83
+ *
84
+ * @return string The record fixed hash.
85
+ */
86
+ public function get_data_hash() {
87
+ return 'unsupported';
88
+ }
89
+
90
+ /**
91
+ * Deletes the base post for this record.
92
+ *
93
+ * @since TBD
94
+ */
95
+ public function delete_post() {
96
+ $this->delete();
97
+ }
98
+ }
src/Tribe/Aggregator/Records.php CHANGED
@@ -2,8 +2,7 @@
2
  // Don't load directly
3
  defined( 'WPINC' ) or die;
4
 
5
- class
6
- Tribe__Events__Aggregator__Records {
7
  /**
8
  * Slug of the Post Type used for Event Aggregator Records
9
  *
@@ -290,11 +289,14 @@ Tribe__Events__Aggregator__Records {
290
  }
291
 
292
  /**
293
- * Returns an appropriate Record object for the given origin
294
  *
295
- * @param string $origin Import origin
 
296
  *
297
- * @return Tribe__Events__Aggregator__Record__Abstract|null
 
 
298
  */
299
  public function get_by_origin( $origin, $post = null ) {
300
  $record = null;
@@ -328,6 +330,10 @@ Tribe__Events__Aggregator__Records {
328
  case 'ea/url':
329
  $record = new Tribe__Events__Aggregator__Record__Url( $post );
330
  break;
 
 
 
 
331
  }
332
 
333
  /**
@@ -432,8 +438,17 @@ Tribe__Events__Aggregator__Records {
432
 
433
  }
434
 
 
 
 
 
 
 
 
 
 
435
  public function query( $args = array() ) {
436
- $statuses = Tribe__Events__Aggregator__Records::$status;
437
  $defaults = array(
438
  'post_status' => array( $statuses->success, $statuses->failed, $statuses->pending ),
439
  'orderby' => 'modified',
@@ -456,13 +471,11 @@ Tribe__Events__Aggregator__Records {
456
 
457
  $args = (object) wp_parse_args( $args, $defaults );
458
 
459
- // Enforce the Post Type
460
  $args->post_type = self::$post_type;
461
 
462
- // Do the actual Query
463
- $query = new WP_Query( $args );
464
-
465
- return $query;
466
  }
467
 
468
  /**
@@ -710,4 +723,46 @@ Tribe__Events__Aggregator__Records {
710
  // Filter eventbrite events to preserve some fields that aren't supported by Eventbrite
711
  add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__Eventbrite', 'filter_event_to_preserve_fields' ), 10, 2 );
712
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
713
  }
2
  // Don't load directly
3
  defined( 'WPINC' ) or die;
4
 
5
+ class Tribe__Events__Aggregator__Records {
 
6
  /**
7
  * Slug of the Post Type used for Event Aggregator Records
8
  *
289
  }
290
 
291
  /**
292
+ * Returns an appropriate Record object for the given origin.
293
  *
294
+ * @param string $origin The record import origin.
295
+ * @param int|WP_Post The record post or post ID.
296
  *
297
+ * @return Tribe__Events__Aggregator__Record__Abstract An instance of the correct record class
298
+ * for the origin or an unsupported record
299
+ * instance.
300
  */
301
  public function get_by_origin( $origin, $post = null ) {
302
  $record = null;
330
  case 'ea/url':
331
  $record = new Tribe__Events__Aggregator__Record__Url( $post );
332
  break;
333
+ default:
334
+ // If there is no match then the record type is unsupported.
335
+ $record = new Tribe__Events__Aggregator__Record__Unsupported( $post );
336
+ break;
337
  }
338
 
339
  /**
438
 
439
  }
440
 
441
+ /**
442
+ * Returns a WP_Query object built using some default arguments for records.
443
+ *
444
+ * @param array $args An array of arguments to override the default ones.
445
+ *
446
+ * @return WP_Query The built WP_Query object; since it's built with arguments
447
+ * the query will run, actually hitting the database, before
448
+ * returning.
449
+ */
450
  public function query( $args = array() ) {
451
+ $statuses = self::$status;
452
  $defaults = array(
453
  'post_status' => array( $statuses->success, $statuses->failed, $statuses->pending ),
454
  'orderby' => 'modified',
471
 
472
  $args = (object) wp_parse_args( $args, $defaults );
473
 
474
+ // Enforce the post type.
475
  $args->post_type = self::$post_type;
476
 
477
+ // Run and return the query.
478
+ return new WP_Query( $args );
 
 
479
  }
480
 
481
  /**
723
  // Filter eventbrite events to preserve some fields that aren't supported by Eventbrite
724
  add_filter( 'tribe_aggregator_before_update_event', array( 'Tribe__Events__Aggregator__Record__Eventbrite', 'filter_event_to_preserve_fields' ), 10, 2 );
725
  }
726
+
727
+ /**
728
+ * Filter records by source and data hash.
729
+ *
730
+ * @param string $source Source value.
731
+ * @param string $data_hash Data hash.
732
+ *
733
+ * @since TBD
734
+ *
735
+ * @return Tribe__Events__Aggregator__Record__Abstract|false Record object or false if not found.
736
+ */
737
+ public function find_by_data_hash( $source, $data_hash ) {
738
+ /** @var WP_Query $matches */
739
+ $matches = $this->query( array(
740
+ 'post_status' => $this->get_status( 'schedule' )->name,
741
+ 'meta_query' => array(
742
+ array(
743
+ 'key' => $this->prefix_meta( 'source' ),
744
+ 'value' => $source,
745
+ ),
746
+ ),
747
+ 'fields' => 'ids',
748
+ ) );
749
+
750
+ if ( empty( $matches->posts ) ) {
751
+ return false;
752
+ }
753
+
754
+ foreach ( $matches->posts as $post_id ) {
755
+ $this_record = $this->get_by_post_id( $post_id );
756
+
757
+ if ( ! $this_record instanceof Tribe__Events__Aggregator__Record__Abstract ) {
758
+ continue;
759
+ }
760
+
761
+ if ( $data_hash === $this_record->get_data_hash() ) {
762
+ return $this_record;
763
+ }
764
+ }
765
+
766
+ return false;
767
+ }
768
  }
src/Tribe/Aggregator/Settings.php CHANGED
@@ -190,7 +190,17 @@ class Tribe__Events__Aggregator__Settings {
190
  'url',
191
  );
192
 
 
 
 
 
 
 
 
 
 
193
  $settings = array();
 
194
  foreach ( $origins as $origin ) {
195
  $settings[ $origin ] = array(
196
  'post_status' => $this->default_post_status( $origin ),
190
  'url',
191
  );
192
 
193
+ /**
194
+ * Filters the origins available for the default import settings handling.
195
+ *
196
+ * @since 4.6.24.1
197
+ *
198
+ * @param array $origins List of origins that support import settings.
199
+ */
200
+ $origins = apply_filters( 'tribe_aggregator_import_setting_origins', $origins );
201
+
202
  $settings = array();
203
+
204
  foreach ( $origins as $origin ) {
205
  $settings[ $origin ] = array(
206
  'post_status' => $this->default_post_status( $origin ),
src/Tribe/Aggregator/Tabs/Abstract.php CHANGED
@@ -125,26 +125,16 @@ abstract class Tribe__Events__Aggregator__Tabs__Abstract extends Tribe__Tabbed_V
125
  // remove non-needed data from the Hash of the Record
126
  unset( $hash['schedule_day'], $hash['schedule_time'] );
127
  ksort( $hash );
128
- $hash = maybe_serialize( $hash );
129
- $hash = md5( $hash );
130
-
131
- $matches = Tribe__Events__Aggregator__Records::instance()->query( array(
132
- 'post_status' => Tribe__Events__Aggregator__Records::instance()->get_status( 'schedule' )->name,
133
- 'meta_query' => array(
134
- Tribe__Events__Aggregator__Records::instance()->prefix_meta( 'source' ) => $meta['source'],
135
- ),
136
- 'fields' => 'ids',
137
- ) );
138
-
139
- foreach ( $matches->posts as $post_id ) {
140
- $matching_hash = Tribe__Events__Aggregator__Records::instance()->get_by_post_id( $post_id )->get_data_hash();
141
-
142
- if ( $matching_hash == $hash ) {
143
- $url = get_edit_post_link( $post_id );
144
- $anchor = '<a href="' . esc_url( $url ) . '">' . esc_attr__( 'click here to edit it', 'the-events-calendar' ) . '</a>';
145
- $message = sprintf( __( 'A record already exists with these settings, %1$s.', 'the-events-calendar' ), $anchor );
146
- wp_send_json_error( array( 'message' => $message ) );
147
- }
148
  }
149
  }
150
 
125
  // remove non-needed data from the Hash of the Record
126
  unset( $hash['schedule_day'], $hash['schedule_time'] );
127
  ksort( $hash );
128
+ $hash = md5( maybe_serialize( $hash ) );
129
+
130
+ /** @var Tribe__Events__Aggregator__Record__Abstract $match */
131
+ $match = tribe( 'events-aggregator.records' )->find_by_data_hash( $meta['source'], $hash );
132
+
133
+ if ( $match instanceof Tribe__Events__Aggregator__Record__Abstract ) {
134
+ $url = get_edit_post_link( $match->id );
135
+ $anchor = '<a href="' . esc_url( $url ) . '">' . esc_attr__( 'click here to edit it', 'the-events-calendar' ) . '</a>';
136
+ $message = sprintf( __( 'A record already exists with these settings, %1$s.', 'the-events-calendar' ), $anchor );
137
+ wp_send_json_error( array( 'message' => $message ) );
 
 
 
 
 
 
 
 
 
 
138
  }
139
  }
140
 
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 = '4.6.24';
36
  const MIN_ADDON_VERSION = '4.4';
37
  const MIN_COMMON_VERSION = '4.7.20';
38
 
32
  const VENUE_POST_TYPE = 'tribe_venue';
33
  const ORGANIZER_POST_TYPE = 'tribe_organizer';
34
 
35
+ const VERSION = '4.6.24.1';
36
  const MIN_ADDON_VERSION = '4.4';
37
  const MIN_COMMON_VERSION = '4.7.20';
38
 
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: 4.6.24
6
  Author: Modern Tribe, Inc.
7
  Author URI: http://m.tri.be/1x
8
  Text Domain: the-events-calendar
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: 4.6.24.1
6
  Author: Modern Tribe, Inc.
7
  Author URI: http://m.tri.be/1x
8
  Text Domain: the-events-calendar