Completed
Pull Request — master (#1558)
by Naveen
59s
created
src/includes/class-wordlift.php 2 patches
Indentation   +1684 added lines, -1684 removed lines patch added patch discarded remove patch
@@ -82,1765 +82,1765 @@
 block discarded – undo
82 82
  */
83 83
 class Wordlift {
84 84
 
85
-	//<editor-fold desc="## FIELDS">
86
-
87
-	/**
88
-	 * The loader that's responsible for maintaining and registering all hooks that power
89
-	 * the plugin.
90
-	 *
91
-	 * @since    1.0.0
92
-	 * @access   protected
93
-	 * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
94
-	 */
95
-	protected $loader;
96
-
97
-	/**
98
-	 * The unique identifier of this plugin.
99
-	 *
100
-	 * @since    1.0.0
101
-	 * @access   protected
102
-	 * @var      string $plugin_name The string used to uniquely identify this plugin.
103
-	 */
104
-	protected $plugin_name;
105
-
106
-	/**
107
-	 * The current version of the plugin.
108
-	 *
109
-	 * @since    1.0.0
110
-	 * @access   protected
111
-	 * @var      string $version The current version of the plugin.
112
-	 */
113
-	protected $version;
114
-
115
-	/**
116
-	 * The {@link Wordlift_Tinymce_Adapter} instance.
117
-	 *
118
-	 * @since  3.12.0
119
-	 * @access protected
120
-	 * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
121
-	 */
122
-	protected $tinymce_adapter;
123
-
124
-	/**
125
-	 * The Schema service.
126
-	 *
127
-	 * @since  3.3.0
128
-	 * @access protected
129
-	 * @var \Wordlift_Schema_Service $schema_service The Schema service.
130
-	 */
131
-	protected $schema_service;
132
-
133
-	/**
134
-	 * The Topic Taxonomy service.
135
-	 *
136
-	 * @since  3.5.0
137
-	 * @access private
138
-	 * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
139
-	 */
140
-	private $topic_taxonomy_service;
141
-
142
-	/**
143
-	 * The Entity Types Taxonomy service.
144
-	 *
145
-	 * @since  3.18.0
146
-	 * @access private
147
-	 * @var \Wordlift_Entity_Type_Taxonomy_Service The Entity Types Taxonomy service.
148
-	 */
149
-	private $entity_types_taxonomy_service;
150
-
151
-	/**
152
-	 * The User service.
153
-	 *
154
-	 * @since  3.1.7
155
-	 * @access protected
156
-	 * @var \Wordlift_User_Service $user_service The User service.
157
-	 */
158
-	protected $user_service;
159
-
160
-	/**
161
-	 * The Timeline service.
162
-	 *
163
-	 * @since  3.1.0
164
-	 * @access private
165
-	 * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
166
-	 */
167
-	private $timeline_service;
168
-
169
-	/**
170
-	 * The Redirect service.
171
-	 *
172
-	 * @since  3.2.0
173
-	 * @access private
174
-	 * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
175
-	 */
176
-	private $redirect_service;
177
-
178
-	/**
179
-	 * The Notice service.
180
-	 *
181
-	 * @since  3.3.0
182
-	 * @access private
183
-	 * @var \Wordlift_Notice_Service $notice_service The Notice service.
184
-	 */
185
-	private $notice_service;
186
-
187
-	/**
188
-	 * The Entity list customization.
189
-	 *
190
-	 * @since  3.3.0
191
-	 * @access protected
192
-	 * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
193
-	 */
194
-	protected $entity_list_service;
195
-
196
-	/**
197
-	 * The Entity Types Taxonomy Walker.
198
-	 *
199
-	 * @since  3.1.0
200
-	 * @access private
201
-	 * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
202
-	 */
203
-	private $entity_types_taxonomy_walker;
204
-
205
-	/**
206
-	 * The ShareThis service.
207
-	 *
208
-	 * @since  3.2.0
209
-	 * @access private
210
-	 * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
211
-	 */
212
-	private $sharethis_service;
213
-
214
-	/**
215
-	 * The PrimaShop adapter.
216
-	 *
217
-	 * @since  3.2.3
218
-	 * @access private
219
-	 * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
220
-	 */
221
-	private $primashop_adapter;
222
-
223
-	/**
224
-	 * The entity type service.
225
-	 *
226
-	 * @since  3.6.0
227
-	 * @access private
228
-	 * @var \Wordlift_Entity_Post_Type_Service
229
-	 */
230
-	private $entity_post_type_service;
231
-
232
-	/**
233
-	 * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
234
-	 *
235
-	 * @since  3.6.0
236
-	 * @access private
237
-	 * @var \Wordlift_Entity_Link_Service $entity_link_service The {@link Wordlift_Entity_Link_Service} instance.
238
-	 */
239
-	private $entity_link_service;
240
-
241
-	/**
242
-	 * A {@link Wordlift_Jsonld_Service} instance.
243
-	 *
244
-	 * @since  3.7.0
245
-	 * @access protected
246
-	 * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
247
-	 */
248
-	protected $jsonld_service;
249
-
250
-	/**
251
-	 * A {@link Wordlift_Website_Jsonld_Converter} instance.
252
-	 *
253
-	 * @since  3.14.0
254
-	 * @access protected
255
-	 * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
256
-	 */
257
-	protected $jsonld_website_converter;
258
-
259
-	/**
260
-	 * A {@link Wordlift_Property_Factory} instance.
261
-	 *
262
-	 * @since  3.7.0
263
-	 * @access private
264
-	 * @var \Wordlift_Property_Factory $property_factory
265
-	 */
266
-	private $property_factory;
267
-
268
-	/**
269
-	 * The 'Download Your Data' page.
270
-	 *
271
-	 * @since  3.6.0
272
-	 * @access private
273
-	 * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
274
-	 */
275
-	private $download_your_data_page;
276
-
277
-	/**
278
-	 * The 'WordLift Settings' page.
279
-	 *
280
-	 * @since  3.11.0
281
-	 * @access protected
282
-	 * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
283
-	 */
284
-	protected $settings_page;
285
-
286
-	/**
287
-	 * The install wizard page.
288
-	 *
289
-	 * @since  3.9.0
290
-	 * @access private
291
-	 * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
292
-	 */
293
-	public $admin_setup;
294
-
295
-	/**
296
-	 * The Content Filter Service hooks up to the 'the_content' filter and provides
297
-	 * linking of entities to their pages.
298
-	 *
299
-	 * @since  3.8.0
300
-	 * @access private
301
-	 * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
302
-	 */
303
-	private $content_filter_service;
304
-
305
-	/**
306
-	 * The Faq Content filter service
307
-	 * @since  3.26.0
308
-	 * @access private
309
-	 * @var Faq_Content_Filter $faq_content_filter_service A {@link Faq_Content_Filter} instance.
310
-	 */
311
-	private $faq_content_filter_service;
312
-
313
-	/**
314
-	 * A {@link Wordlift_Key_Validation_Service} instance.
315
-	 *
316
-	 * @since  3.9.0
317
-	 * @access private
318
-	 * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
319
-	 */
320
-	private $key_validation_service;
321
-
322
-	/**
323
-	 * A {@link Wordlift_Rating_Service} instance.
324
-	 *
325
-	 * @since  3.10.0
326
-	 * @access private
327
-	 * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
328
-	 */
329
-	private $rating_service;
330
-
331
-	/**
332
-	 * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
333
-	 *
334
-	 * @since  3.10.0
335
-	 * @access protected
336
-	 * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
337
-	 */
338
-	protected $post_to_jsonld_converter;
339
-
340
-	/**
341
-	 * A {@link Wordlift_Install_Service} instance.
342
-	 *
343
-	 * @since  3.18.0
344
-	 * @access protected
345
-	 * @var \Wordlift_Install_Service $install_service A {@link Wordlift_Install_Service} instance.
346
-	 */
347
-	protected $install_service;
348
-
349
-	/**
350
-	 * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
351
-	 *
352
-	 * @since  3.10.0
353
-	 * @access protected
354
-	 * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
355
-	 */
356
-	protected $entity_post_to_jsonld_converter;
357
-
358
-	/**
359
-	 * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
360
-	 *
361
-	 * @since  3.10.0
362
-	 * @access protected
363
-	 * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
364
-	 */
365
-	protected $postid_to_jsonld_converter;
366
-
367
-	/**
368
-	 * The {@link Wordlift_Category_Taxonomy_Service} instance.
369
-	 *
370
-	 * @since  3.11.0
371
-	 * @access protected
372
-	 * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
373
-	 */
374
-	protected $category_taxonomy_service;
375
-
376
-	/**
377
-	 * The {@link Wordlift_Entity_Page_Service} instance.
378
-	 *
379
-	 * @since  3.11.0
380
-	 * @access protected
381
-	 * @var \Wordlift_Entity_Page_Service $entity_page_service The {@link Wordlift_Entity_Page_Service} instance.
382
-	 */
383
-	protected $entity_page_service;
384
-
385
-	/**
386
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
387
-	 *
388
-	 * @since  3.11.0
389
-	 * @access protected
390
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
391
-	 */
392
-	protected $settings_page_action_link;
393
-
394
-	/**
395
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
396
-	 *
397
-	 * @since  3.11.0
398
-	 * @access protected
399
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
400
-	 */
401
-	protected $analytics_settings_page_action_link;
402
-
403
-	/**
404
-	 * The {@link Wordlift_Analytics_Connect} class.
405
-	 *
406
-	 * @since  3.11.0
407
-	 * @access protected
408
-	 * @var \Wordlift_Analytics_Connect $analytics_connect The {@link Wordlift_Analytics_Connect} class.
409
-	 */
410
-	protected $analytics_connect;
411
-
412
-	/**
413
-	 * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
414
-	 *
415
-	 * @since  3.11.0
416
-	 * @access protected
417
-	 * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
418
-	 */
419
-	protected $publisher_ajax_adapter;
420
-
421
-	/**
422
-	 * The {@link Wordlift_Admin_Input_Element} element renderer.
423
-	 *
424
-	 * @since  3.11.0
425
-	 * @access protected
426
-	 * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
427
-	 */
428
-	protected $input_element;
429
-
430
-	/**
431
-	 * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
432
-	 *
433
-	 * @since  3.13.0
434
-	 * @access protected
435
-	 * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
436
-	 */
437
-	protected $radio_input_element;
438
-
439
-	/**
440
-	 * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
441
-	 *
442
-	 * @since  3.11.0
443
-	 * @access protected
444
-	 * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
445
-	 */
446
-	protected $language_select_element;
447
-
448
-	/**
449
-	 * The {@link Wordlift_Admin_Country_Select_Element} element renderer.
450
-	 *
451
-	 * @since  3.18.0
452
-	 * @access protected
453
-	 * @var \Wordlift_Admin_Country_Select_Element $country_select_element The {@link Wordlift_Admin_Country_Select_Element} element renderer.
454
-	 */
455
-	protected $country_select_element;
456
-
457
-	/**
458
-	 * The {@link Wordlift_Admin_Publisher_Element} element renderer.
459
-	 *
460
-	 * @since  3.11.0
461
-	 * @access protected
462
-	 * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
463
-	 */
464
-	protected $publisher_element;
465
-
466
-	/**
467
-	 * The {@link Wordlift_Admin_Select2_Element} element renderer.
468
-	 *
469
-	 * @since  3.11.0
470
-	 * @access protected
471
-	 * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
472
-	 */
473
-	protected $select2_element;
474
-
475
-	/**
476
-	 * The controller for the entity type list admin page
477
-	 *
478
-	 * @since  3.11.0
479
-	 * @access private
480
-	 * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
481
-	 */
482
-	private $entity_type_admin_page;
483
-
484
-	/**
485
-	 * The controller for the entity type settings admin page
486
-	 *
487
-	 * @since  3.11.0
488
-	 * @access private
489
-	 * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
490
-	 */
491
-	private $entity_type_settings_admin_page;
492
-
493
-	/**
494
-	 * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
495
-	 *
496
-	 * @since  3.11.0
497
-	 * @access protected
498
-	 * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
499
-	 */
500
-	protected $related_entities_cloud_widget;
501
-
502
-	/**
503
-	 * The {@link Wordlift_Admin_Author_Element} instance.
504
-	 *
505
-	 * @since  3.14.0
506
-	 * @access protected
507
-	 * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
508
-	 */
509
-	protected $author_element;
510
-
511
-	/**
512
-	 * The {@link Wordlift_Sample_Data_Service} instance.
513
-	 *
514
-	 * @since  3.12.0
515
-	 * @access protected
516
-	 * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
517
-	 */
518
-	protected $sample_data_service;
519
-
520
-	/**
521
-	 * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
522
-	 *
523
-	 * @since  3.12.0
524
-	 * @access protected
525
-	 * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
526
-	 */
527
-	protected $sample_data_ajax_adapter;
528
-
529
-	/**
530
-	 * The {@link Wordlift_Google_Analytics_Export_Service} instance.
531
-	 *
532
-	 * @since  3.16.0
533
-	 * @access protected
534
-	 * @var \Wordlift_Google_Analytics_Export_Service $google_analytics_export_service The {@link Wordlift_Google_Analytics_Export_Service} instance.
535
-	 */
536
-	protected $google_analytics_export_service;
537
-
538
-	/**
539
-	 * {@link Wordlift}'s singleton instance.
540
-	 *
541
-	 * @since  3.15.0
542
-	 * @access protected
543
-	 * @var \Wordlift_Entity_Type_Adapter $entity_type_adapter The {@link Wordlift_Entity_Type_Adapter} instance.
544
-	 */
545
-	protected $entity_type_adapter;
546
-
547
-	/**
548
-	 * The {@link Wordlift_Storage_Factory} instance.
549
-	 *
550
-	 * @since  3.15.0
551
-	 * @access protected
552
-	 * @var \Wordlift_Storage_Factory $storage_factory The {@link Wordlift_Storage_Factory} instance.
553
-	 */
554
-	protected $storage_factory;
555
-
556
-	/**
557
-	 * The {@link Wordlift_Autocomplete_Adapter} instance.
558
-	 *
559
-	 * @since  3.15.0
560
-	 * @access private
561
-	 * @var \Wordlift_Autocomplete_Adapter $autocomplete_adapter The {@link Wordlift_Autocomplete_Adapter} instance.
562
-	 */
563
-	private $autocomplete_adapter;
564
-
565
-	/**
566
-	 * The {@link Wordlift_Cached_Post_Converter} instance.
567
-	 *
568
-	 * @since  3.16.0
569
-	 * @access protected
570
-	 * @var  \Wordlift_Cached_Post_Converter $cached_postid_to_jsonld_converter The {@link Wordlift_Cached_Post_Converter} instance.
571
-	 *
572
-	 */
573
-	protected $cached_postid_to_jsonld_converter;
574
-
575
-	/**
576
-	 * The {@link Wordlift_Entity_Uri_Service} instance.
577
-	 *
578
-	 * @since  3.16.3
579
-	 * @access protected
580
-	 * @var \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance.
581
-	 */
582
-	protected $entity_uri_service;
583
-
584
-	/**
585
-	 * The {@link Wordlift_Publisher_Service} instance.
586
-	 *
587
-	 * @since  3.19.0
588
-	 * @access protected
589
-	 * @var \Wordlift_Publisher_Service $publisher_service The {@link Wordlift_Publisher_Service} instance.
590
-	 */
591
-	protected $publisher_service;
592
-
593
-	/**
594
-	 * The {@link Wordlift_Context_Cards_Service} instance.
595
-	 *
596
-	 * @var \Wordlift_Context_Cards_Service The {@link Wordlift_Context_Cards_Service} instance.
597
-	 */
598
-	protected $context_cards_service;
599
-
600
-	/**
601
-	 * {@link Wordlift}'s singleton instance.
602
-	 *
603
-	 * @since  3.11.2
604
-	 * @access private
605
-	 * @var Wordlift $instance {@link Wordlift}'s singleton instance.
606
-	 */
607
-	private static $instance;
608
-
609
-	/**
610
-	 * A singleton instance of features registry.
611
-	 * @since 3.30.0
612
-	 * @var Features_Registry
613
-	 */
614
-	private $features_registry;
615
-
616
-	private $analytics_settings_page;
617
-	//</editor-fold>
618
-
619
-	// Experimental code added by Nishit for feature request 1496
620
-	private $webhook_loader;
621
-	// Experimental code ents here
622
-
623
-	/**
624
-	 * Define the core functionality of the plugin.
625
-	 *
626
-	 * Set the plugin name and the plugin version that can be used throughout the plugin.
627
-	 * Load the dependencies, define the locale, and set the hooks for the admin area and
628
-	 * the public-facing side of the site.
629
-	 *
630
-	 * @since    1.0.0
631
-	 */
632
-	public function __construct() {
633
-
634
-		self::$instance = $this;
635
-
636
-		$this->plugin_name = 'wordlift';
637
-		$this->version     = '3.37.0';
638
-		$this->load_dependencies();
639
-		$this->set_locale();
640
-
641
-		$that = $this;
642
-		add_action( 'plugins_loaded', function () use ( $that ) {
643
-			$that->define_admin_hooks( $that );
644
-			$that->define_public_hooks( $that );
645
-		}, 4 );
646
-
647
-		// If we're in `WP_CLI` load the related files.
648
-		if ( class_exists( 'WP_CLI' ) ) {
649
-			$this->load_cli_dependencies();
650
-		}
651
-
652
-	}
653
-
654
-	/**
655
-	 * Get the singleton instance.
656
-	 *
657
-	 * @return Wordlift The {@link Wordlift} singleton instance.
658
-	 * @since 3.11.2
659
-	 *
660
-	 */
661
-	public static function get_instance() {
662
-
663
-		return self::$instance;
664
-	}
665
-
666
-	/**
667
-	 * Load the required dependencies for this plugin.
668
-	 *
669
-	 * Include the following files that make up the plugin:
670
-	 *
671
-	 * - Wordlift_Loader. Orchestrates the hooks of the plugin.
672
-	 * - Wordlift_i18n. Defines internationalization functionality.
673
-	 * - Wordlift_Admin. Defines all hooks for the admin area.
674
-	 * - Wordlift_Public. Defines all hooks for the public side of the site.
675
-	 *
676
-	 * Create an instance of the loader which will be used to register the hooks
677
-	 * with WordPress.
678
-	 *
679
-	 * @throws Exception
680
-	 * @since    1.0.0
681
-	 * @access   private
682
-	 */
683
-	private function load_dependencies() {
684
-
685
-		/**
686
-		 * The class responsible for orchestrating the actions and filters of the
687
-		 * core plugin.
688
-		 */
689
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
690
-
691
-		// The class responsible for plugin uninstall.
692
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php';
693
-
694
-		/**
695
-		 * The class responsible for defining internationalization functionality
696
-		 * of the plugin.
697
-		 */
698
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
699
-
700
-		/**
701
-		 * WordLift's supported languages.
702
-		 */
703
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
704
-
705
-		/**
706
-		 * WordLift's supported countries.
707
-		 */
708
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php';
709
-
710
-		/**
711
-		 * Provide support functions to sanitize data.
712
-		 */
713
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
714
-
715
-		/** Services. */
716
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
717
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php';
718
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
719
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
720
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
721
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
722
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
723
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php';
724
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php';
725
-
726
-		/**
727
-		 * The Schema service.
728
-		 */
729
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
730
-
731
-		/**
732
-		 * The schema:url property service.
733
-		 */
734
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
735
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
736
-
737
-		/**
738
-		 * The UI service.
739
-		 */
740
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
741
-
742
-		/**
743
-		 * The Entity Types Taxonomy service.
744
-		 */
745
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
746
-
747
-		/**
748
-		 * The Entity service.
749
-		 */
750
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php';
751
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
752
-
753
-		// Add the entity rating service.
754
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
755
-
756
-		/**
757
-		 * The User service.
758
-		 */
759
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
760
-
761
-		/**
762
-		 * The Timeline service.
763
-		 */
764
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
765
-
766
-		/**
767
-		 * The Topic Taxonomy service.
768
-		 */
769
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
770
-
771
-		/**
772
-		 * The WordLift URI service.
773
-		 */
774
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
775
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
776
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
777
-
778
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
779
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
780
-
781
-		/**
782
-		 * Load the converters.
783
-		 */
784
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
785
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
786
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
787
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
788
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
789
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
790
-
791
-		/**
792
-		 * Load cache-related files.
793
-		 */
794
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php';
795
-
796
-		/**
797
-		 * Load the content filter.
798
-		 */
799
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
800
-
801
-		/*
85
+    //<editor-fold desc="## FIELDS">
86
+
87
+    /**
88
+     * The loader that's responsible for maintaining and registering all hooks that power
89
+     * the plugin.
90
+     *
91
+     * @since    1.0.0
92
+     * @access   protected
93
+     * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
94
+     */
95
+    protected $loader;
96
+
97
+    /**
98
+     * The unique identifier of this plugin.
99
+     *
100
+     * @since    1.0.0
101
+     * @access   protected
102
+     * @var      string $plugin_name The string used to uniquely identify this plugin.
103
+     */
104
+    protected $plugin_name;
105
+
106
+    /**
107
+     * The current version of the plugin.
108
+     *
109
+     * @since    1.0.0
110
+     * @access   protected
111
+     * @var      string $version The current version of the plugin.
112
+     */
113
+    protected $version;
114
+
115
+    /**
116
+     * The {@link Wordlift_Tinymce_Adapter} instance.
117
+     *
118
+     * @since  3.12.0
119
+     * @access protected
120
+     * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
121
+     */
122
+    protected $tinymce_adapter;
123
+
124
+    /**
125
+     * The Schema service.
126
+     *
127
+     * @since  3.3.0
128
+     * @access protected
129
+     * @var \Wordlift_Schema_Service $schema_service The Schema service.
130
+     */
131
+    protected $schema_service;
132
+
133
+    /**
134
+     * The Topic Taxonomy service.
135
+     *
136
+     * @since  3.5.0
137
+     * @access private
138
+     * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
139
+     */
140
+    private $topic_taxonomy_service;
141
+
142
+    /**
143
+     * The Entity Types Taxonomy service.
144
+     *
145
+     * @since  3.18.0
146
+     * @access private
147
+     * @var \Wordlift_Entity_Type_Taxonomy_Service The Entity Types Taxonomy service.
148
+     */
149
+    private $entity_types_taxonomy_service;
150
+
151
+    /**
152
+     * The User service.
153
+     *
154
+     * @since  3.1.7
155
+     * @access protected
156
+     * @var \Wordlift_User_Service $user_service The User service.
157
+     */
158
+    protected $user_service;
159
+
160
+    /**
161
+     * The Timeline service.
162
+     *
163
+     * @since  3.1.0
164
+     * @access private
165
+     * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
166
+     */
167
+    private $timeline_service;
168
+
169
+    /**
170
+     * The Redirect service.
171
+     *
172
+     * @since  3.2.0
173
+     * @access private
174
+     * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
175
+     */
176
+    private $redirect_service;
177
+
178
+    /**
179
+     * The Notice service.
180
+     *
181
+     * @since  3.3.0
182
+     * @access private
183
+     * @var \Wordlift_Notice_Service $notice_service The Notice service.
184
+     */
185
+    private $notice_service;
186
+
187
+    /**
188
+     * The Entity list customization.
189
+     *
190
+     * @since  3.3.0
191
+     * @access protected
192
+     * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
193
+     */
194
+    protected $entity_list_service;
195
+
196
+    /**
197
+     * The Entity Types Taxonomy Walker.
198
+     *
199
+     * @since  3.1.0
200
+     * @access private
201
+     * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
202
+     */
203
+    private $entity_types_taxonomy_walker;
204
+
205
+    /**
206
+     * The ShareThis service.
207
+     *
208
+     * @since  3.2.0
209
+     * @access private
210
+     * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
211
+     */
212
+    private $sharethis_service;
213
+
214
+    /**
215
+     * The PrimaShop adapter.
216
+     *
217
+     * @since  3.2.3
218
+     * @access private
219
+     * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
220
+     */
221
+    private $primashop_adapter;
222
+
223
+    /**
224
+     * The entity type service.
225
+     *
226
+     * @since  3.6.0
227
+     * @access private
228
+     * @var \Wordlift_Entity_Post_Type_Service
229
+     */
230
+    private $entity_post_type_service;
231
+
232
+    /**
233
+     * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
234
+     *
235
+     * @since  3.6.0
236
+     * @access private
237
+     * @var \Wordlift_Entity_Link_Service $entity_link_service The {@link Wordlift_Entity_Link_Service} instance.
238
+     */
239
+    private $entity_link_service;
240
+
241
+    /**
242
+     * A {@link Wordlift_Jsonld_Service} instance.
243
+     *
244
+     * @since  3.7.0
245
+     * @access protected
246
+     * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
247
+     */
248
+    protected $jsonld_service;
249
+
250
+    /**
251
+     * A {@link Wordlift_Website_Jsonld_Converter} instance.
252
+     *
253
+     * @since  3.14.0
254
+     * @access protected
255
+     * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
256
+     */
257
+    protected $jsonld_website_converter;
258
+
259
+    /**
260
+     * A {@link Wordlift_Property_Factory} instance.
261
+     *
262
+     * @since  3.7.0
263
+     * @access private
264
+     * @var \Wordlift_Property_Factory $property_factory
265
+     */
266
+    private $property_factory;
267
+
268
+    /**
269
+     * The 'Download Your Data' page.
270
+     *
271
+     * @since  3.6.0
272
+     * @access private
273
+     * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
274
+     */
275
+    private $download_your_data_page;
276
+
277
+    /**
278
+     * The 'WordLift Settings' page.
279
+     *
280
+     * @since  3.11.0
281
+     * @access protected
282
+     * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
283
+     */
284
+    protected $settings_page;
285
+
286
+    /**
287
+     * The install wizard page.
288
+     *
289
+     * @since  3.9.0
290
+     * @access private
291
+     * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
292
+     */
293
+    public $admin_setup;
294
+
295
+    /**
296
+     * The Content Filter Service hooks up to the 'the_content' filter and provides
297
+     * linking of entities to their pages.
298
+     *
299
+     * @since  3.8.0
300
+     * @access private
301
+     * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
302
+     */
303
+    private $content_filter_service;
304
+
305
+    /**
306
+     * The Faq Content filter service
307
+     * @since  3.26.0
308
+     * @access private
309
+     * @var Faq_Content_Filter $faq_content_filter_service A {@link Faq_Content_Filter} instance.
310
+     */
311
+    private $faq_content_filter_service;
312
+
313
+    /**
314
+     * A {@link Wordlift_Key_Validation_Service} instance.
315
+     *
316
+     * @since  3.9.0
317
+     * @access private
318
+     * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
319
+     */
320
+    private $key_validation_service;
321
+
322
+    /**
323
+     * A {@link Wordlift_Rating_Service} instance.
324
+     *
325
+     * @since  3.10.0
326
+     * @access private
327
+     * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
328
+     */
329
+    private $rating_service;
330
+
331
+    /**
332
+     * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
333
+     *
334
+     * @since  3.10.0
335
+     * @access protected
336
+     * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
337
+     */
338
+    protected $post_to_jsonld_converter;
339
+
340
+    /**
341
+     * A {@link Wordlift_Install_Service} instance.
342
+     *
343
+     * @since  3.18.0
344
+     * @access protected
345
+     * @var \Wordlift_Install_Service $install_service A {@link Wordlift_Install_Service} instance.
346
+     */
347
+    protected $install_service;
348
+
349
+    /**
350
+     * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
351
+     *
352
+     * @since  3.10.0
353
+     * @access protected
354
+     * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
355
+     */
356
+    protected $entity_post_to_jsonld_converter;
357
+
358
+    /**
359
+     * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
360
+     *
361
+     * @since  3.10.0
362
+     * @access protected
363
+     * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
364
+     */
365
+    protected $postid_to_jsonld_converter;
366
+
367
+    /**
368
+     * The {@link Wordlift_Category_Taxonomy_Service} instance.
369
+     *
370
+     * @since  3.11.0
371
+     * @access protected
372
+     * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
373
+     */
374
+    protected $category_taxonomy_service;
375
+
376
+    /**
377
+     * The {@link Wordlift_Entity_Page_Service} instance.
378
+     *
379
+     * @since  3.11.0
380
+     * @access protected
381
+     * @var \Wordlift_Entity_Page_Service $entity_page_service The {@link Wordlift_Entity_Page_Service} instance.
382
+     */
383
+    protected $entity_page_service;
384
+
385
+    /**
386
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
387
+     *
388
+     * @since  3.11.0
389
+     * @access protected
390
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
391
+     */
392
+    protected $settings_page_action_link;
393
+
394
+    /**
395
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
396
+     *
397
+     * @since  3.11.0
398
+     * @access protected
399
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
400
+     */
401
+    protected $analytics_settings_page_action_link;
402
+
403
+    /**
404
+     * The {@link Wordlift_Analytics_Connect} class.
405
+     *
406
+     * @since  3.11.0
407
+     * @access protected
408
+     * @var \Wordlift_Analytics_Connect $analytics_connect The {@link Wordlift_Analytics_Connect} class.
409
+     */
410
+    protected $analytics_connect;
411
+
412
+    /**
413
+     * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
414
+     *
415
+     * @since  3.11.0
416
+     * @access protected
417
+     * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
418
+     */
419
+    protected $publisher_ajax_adapter;
420
+
421
+    /**
422
+     * The {@link Wordlift_Admin_Input_Element} element renderer.
423
+     *
424
+     * @since  3.11.0
425
+     * @access protected
426
+     * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
427
+     */
428
+    protected $input_element;
429
+
430
+    /**
431
+     * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
432
+     *
433
+     * @since  3.13.0
434
+     * @access protected
435
+     * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
436
+     */
437
+    protected $radio_input_element;
438
+
439
+    /**
440
+     * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
441
+     *
442
+     * @since  3.11.0
443
+     * @access protected
444
+     * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
445
+     */
446
+    protected $language_select_element;
447
+
448
+    /**
449
+     * The {@link Wordlift_Admin_Country_Select_Element} element renderer.
450
+     *
451
+     * @since  3.18.0
452
+     * @access protected
453
+     * @var \Wordlift_Admin_Country_Select_Element $country_select_element The {@link Wordlift_Admin_Country_Select_Element} element renderer.
454
+     */
455
+    protected $country_select_element;
456
+
457
+    /**
458
+     * The {@link Wordlift_Admin_Publisher_Element} element renderer.
459
+     *
460
+     * @since  3.11.0
461
+     * @access protected
462
+     * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
463
+     */
464
+    protected $publisher_element;
465
+
466
+    /**
467
+     * The {@link Wordlift_Admin_Select2_Element} element renderer.
468
+     *
469
+     * @since  3.11.0
470
+     * @access protected
471
+     * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
472
+     */
473
+    protected $select2_element;
474
+
475
+    /**
476
+     * The controller for the entity type list admin page
477
+     *
478
+     * @since  3.11.0
479
+     * @access private
480
+     * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
481
+     */
482
+    private $entity_type_admin_page;
483
+
484
+    /**
485
+     * The controller for the entity type settings admin page
486
+     *
487
+     * @since  3.11.0
488
+     * @access private
489
+     * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
490
+     */
491
+    private $entity_type_settings_admin_page;
492
+
493
+    /**
494
+     * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
495
+     *
496
+     * @since  3.11.0
497
+     * @access protected
498
+     * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
499
+     */
500
+    protected $related_entities_cloud_widget;
501
+
502
+    /**
503
+     * The {@link Wordlift_Admin_Author_Element} instance.
504
+     *
505
+     * @since  3.14.0
506
+     * @access protected
507
+     * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
508
+     */
509
+    protected $author_element;
510
+
511
+    /**
512
+     * The {@link Wordlift_Sample_Data_Service} instance.
513
+     *
514
+     * @since  3.12.0
515
+     * @access protected
516
+     * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
517
+     */
518
+    protected $sample_data_service;
519
+
520
+    /**
521
+     * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
522
+     *
523
+     * @since  3.12.0
524
+     * @access protected
525
+     * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
526
+     */
527
+    protected $sample_data_ajax_adapter;
528
+
529
+    /**
530
+     * The {@link Wordlift_Google_Analytics_Export_Service} instance.
531
+     *
532
+     * @since  3.16.0
533
+     * @access protected
534
+     * @var \Wordlift_Google_Analytics_Export_Service $google_analytics_export_service The {@link Wordlift_Google_Analytics_Export_Service} instance.
535
+     */
536
+    protected $google_analytics_export_service;
537
+
538
+    /**
539
+     * {@link Wordlift}'s singleton instance.
540
+     *
541
+     * @since  3.15.0
542
+     * @access protected
543
+     * @var \Wordlift_Entity_Type_Adapter $entity_type_adapter The {@link Wordlift_Entity_Type_Adapter} instance.
544
+     */
545
+    protected $entity_type_adapter;
546
+
547
+    /**
548
+     * The {@link Wordlift_Storage_Factory} instance.
549
+     *
550
+     * @since  3.15.0
551
+     * @access protected
552
+     * @var \Wordlift_Storage_Factory $storage_factory The {@link Wordlift_Storage_Factory} instance.
553
+     */
554
+    protected $storage_factory;
555
+
556
+    /**
557
+     * The {@link Wordlift_Autocomplete_Adapter} instance.
558
+     *
559
+     * @since  3.15.0
560
+     * @access private
561
+     * @var \Wordlift_Autocomplete_Adapter $autocomplete_adapter The {@link Wordlift_Autocomplete_Adapter} instance.
562
+     */
563
+    private $autocomplete_adapter;
564
+
565
+    /**
566
+     * The {@link Wordlift_Cached_Post_Converter} instance.
567
+     *
568
+     * @since  3.16.0
569
+     * @access protected
570
+     * @var  \Wordlift_Cached_Post_Converter $cached_postid_to_jsonld_converter The {@link Wordlift_Cached_Post_Converter} instance.
571
+     *
572
+     */
573
+    protected $cached_postid_to_jsonld_converter;
574
+
575
+    /**
576
+     * The {@link Wordlift_Entity_Uri_Service} instance.
577
+     *
578
+     * @since  3.16.3
579
+     * @access protected
580
+     * @var \Wordlift_Entity_Uri_Service $entity_uri_service The {@link Wordlift_Entity_Uri_Service} instance.
581
+     */
582
+    protected $entity_uri_service;
583
+
584
+    /**
585
+     * The {@link Wordlift_Publisher_Service} instance.
586
+     *
587
+     * @since  3.19.0
588
+     * @access protected
589
+     * @var \Wordlift_Publisher_Service $publisher_service The {@link Wordlift_Publisher_Service} instance.
590
+     */
591
+    protected $publisher_service;
592
+
593
+    /**
594
+     * The {@link Wordlift_Context_Cards_Service} instance.
595
+     *
596
+     * @var \Wordlift_Context_Cards_Service The {@link Wordlift_Context_Cards_Service} instance.
597
+     */
598
+    protected $context_cards_service;
599
+
600
+    /**
601
+     * {@link Wordlift}'s singleton instance.
602
+     *
603
+     * @since  3.11.2
604
+     * @access private
605
+     * @var Wordlift $instance {@link Wordlift}'s singleton instance.
606
+     */
607
+    private static $instance;
608
+
609
+    /**
610
+     * A singleton instance of features registry.
611
+     * @since 3.30.0
612
+     * @var Features_Registry
613
+     */
614
+    private $features_registry;
615
+
616
+    private $analytics_settings_page;
617
+    //</editor-fold>
618
+
619
+    // Experimental code added by Nishit for feature request 1496
620
+    private $webhook_loader;
621
+    // Experimental code ents here
622
+
623
+    /**
624
+     * Define the core functionality of the plugin.
625
+     *
626
+     * Set the plugin name and the plugin version that can be used throughout the plugin.
627
+     * Load the dependencies, define the locale, and set the hooks for the admin area and
628
+     * the public-facing side of the site.
629
+     *
630
+     * @since    1.0.0
631
+     */
632
+    public function __construct() {
633
+
634
+        self::$instance = $this;
635
+
636
+        $this->plugin_name = 'wordlift';
637
+        $this->version     = '3.37.0';
638
+        $this->load_dependencies();
639
+        $this->set_locale();
640
+
641
+        $that = $this;
642
+        add_action( 'plugins_loaded', function () use ( $that ) {
643
+            $that->define_admin_hooks( $that );
644
+            $that->define_public_hooks( $that );
645
+        }, 4 );
646
+
647
+        // If we're in `WP_CLI` load the related files.
648
+        if ( class_exists( 'WP_CLI' ) ) {
649
+            $this->load_cli_dependencies();
650
+        }
651
+
652
+    }
653
+
654
+    /**
655
+     * Get the singleton instance.
656
+     *
657
+     * @return Wordlift The {@link Wordlift} singleton instance.
658
+     * @since 3.11.2
659
+     *
660
+     */
661
+    public static function get_instance() {
662
+
663
+        return self::$instance;
664
+    }
665
+
666
+    /**
667
+     * Load the required dependencies for this plugin.
668
+     *
669
+     * Include the following files that make up the plugin:
670
+     *
671
+     * - Wordlift_Loader. Orchestrates the hooks of the plugin.
672
+     * - Wordlift_i18n. Defines internationalization functionality.
673
+     * - Wordlift_Admin. Defines all hooks for the admin area.
674
+     * - Wordlift_Public. Defines all hooks for the public side of the site.
675
+     *
676
+     * Create an instance of the loader which will be used to register the hooks
677
+     * with WordPress.
678
+     *
679
+     * @throws Exception
680
+     * @since    1.0.0
681
+     * @access   private
682
+     */
683
+    private function load_dependencies() {
684
+
685
+        /**
686
+         * The class responsible for orchestrating the actions and filters of the
687
+         * core plugin.
688
+         */
689
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
690
+
691
+        // The class responsible for plugin uninstall.
692
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php';
693
+
694
+        /**
695
+         * The class responsible for defining internationalization functionality
696
+         * of the plugin.
697
+         */
698
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
699
+
700
+        /**
701
+         * WordLift's supported languages.
702
+         */
703
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
704
+
705
+        /**
706
+         * WordLift's supported countries.
707
+         */
708
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php';
709
+
710
+        /**
711
+         * Provide support functions to sanitize data.
712
+         */
713
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
714
+
715
+        /** Services. */
716
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
717
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php';
718
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
719
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
720
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
721
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
722
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
723
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php';
724
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php';
725
+
726
+        /**
727
+         * The Schema service.
728
+         */
729
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
730
+
731
+        /**
732
+         * The schema:url property service.
733
+         */
734
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
735
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
736
+
737
+        /**
738
+         * The UI service.
739
+         */
740
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
741
+
742
+        /**
743
+         * The Entity Types Taxonomy service.
744
+         */
745
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
746
+
747
+        /**
748
+         * The Entity service.
749
+         */
750
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php';
751
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
752
+
753
+        // Add the entity rating service.
754
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
755
+
756
+        /**
757
+         * The User service.
758
+         */
759
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
760
+
761
+        /**
762
+         * The Timeline service.
763
+         */
764
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
765
+
766
+        /**
767
+         * The Topic Taxonomy service.
768
+         */
769
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
770
+
771
+        /**
772
+         * The WordLift URI service.
773
+         */
774
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
775
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
776
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
777
+
778
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
779
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
780
+
781
+        /**
782
+         * Load the converters.
783
+         */
784
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
785
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
786
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
787
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
788
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
789
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
790
+
791
+        /**
792
+         * Load cache-related files.
793
+         */
794
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php';
795
+
796
+        /**
797
+         * Load the content filter.
798
+         */
799
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
800
+
801
+        /*
802 802
 		 * Load the excerpt helper.
803 803
 		 */
804
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
805
-
806
-		/**
807
-		 * Load the JSON-LD service to publish entities using JSON-LD.s
808
-		 *
809
-		 * @since 3.8.0
810
-		 */
811
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
812
-
813
-		// The Publisher Service and the AJAX adapter.
814
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
815
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
816
-
817
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
818
-
819
-		/**
820
-		 * Load the WordLift key validation service.
821
-		 */
822
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
823
-
824
-		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
825
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
826
-
827
-		// Load the `Wordlift_Entity_Page_Service` class definition.
828
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php';
829
-
830
-		/** Linked Data. */
831
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php';
832
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
833
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
834
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
835
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
836
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
837
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
838
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
839
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
841
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
842
-
843
-		/** Services. */
844
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php';
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php';
846
-
847
-		/** Adapters. */
848
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
849
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
851
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php';
852
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php';
853
-
854
-		/** Autocomplete. */
855
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php';
856
-
857
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php';
858
-
859
-		/** Analytics */
860
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php';
861
-
862
-		/**
863
-		 * The class responsible for defining all actions that occur in the admin area.
864
-		 */
865
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
866
-
867
-		/**
868
-		 * The class to customize the entity list admin page.
869
-		 */
870
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
871
-
872
-		/**
873
-		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
874
-		 */
875
-		global $wp_version;
876
-		if ( version_compare( $wp_version, '5.3', '<' ) ) {
877
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
878
-		} else {
879
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
880
-		}
881
-
882
-		/**
883
-		 * The Notice service.
884
-		 */
885
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
886
-
887
-		/**
888
-		 * The PrimaShop adapter.
889
-		 */
890
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
891
-
892
-		/**
893
-		 * The WordLift Dashboard service.
894
-		 */
895
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
896
-
897
-		/**
898
-		 * The admin 'Install wizard' page.
899
-		 */
900
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
901
-
902
-		/**
903
-		 * The WordLift entity type list admin page controller.
904
-		 */
905
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
906
-
907
-		/**
908
-		 * The WordLift entity type settings admin page controller.
909
-		 */
910
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
911
-
912
-		/**
913
-		 * The admin 'Download Your Data' page.
914
-		 */
915
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
916
-
917
-		/**
918
-		 * The admin 'WordLift Settings' page.
919
-		 */
920
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php';
921
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php';
922
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php';
923
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php';
924
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php';
925
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
926
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
927
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
928
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php';
929
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
930
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
931
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
932
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
933
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
934
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
935
-
936
-		/** Admin Pages */
937
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
938
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php';
939
-
940
-		/**
941
-		 * The class responsible for defining all actions that occur in the public-facing
942
-		 * side of the site.
943
-		 */
944
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
945
-
946
-		/**
947
-		 * The shortcode abstract class.
948
-		 */
949
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
950
-
951
-		/**
952
-		 * The Timeline shortcode.
953
-		 */
954
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
955
-
956
-		/**
957
-		 * The Navigator shortcode.
958
-		 */
959
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
960
-
961
-		/**
962
-		 * The Products Navigator shortcode.
963
-		 */
964
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-products-navigator-shortcode.php';
965
-
966
-		/**
967
-		 * The chord shortcode.
968
-		 */
969
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
970
-
971
-		/**
972
-		 * The geomap shortcode.
973
-		 */
974
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
975
-
976
-		/**
977
-		 * The entity cloud shortcode.
978
-		 */
979
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
980
-
981
-		/**
982
-		 * The entity glossary shortcode.
983
-		 */
984
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php';
985
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php';
986
-
987
-		/**
988
-		 * Faceted Search shortcode.
989
-		 */
990
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php';
991
-
992
-		/**
993
-		 * The ShareThis service.
994
-		 */
995
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
996
-
997
-		/**
998
-		 * The SEO service.
999
-		 */
1000
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
1001
-
1002
-		/**
1003
-		 * The AMP service.
1004
-		 */
1005
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
1006
-
1007
-		/** Widgets */
1008
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
1009
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1010
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php';
1011
-
1012
-		/*
804
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
805
+
806
+        /**
807
+         * Load the JSON-LD service to publish entities using JSON-LD.s
808
+         *
809
+         * @since 3.8.0
810
+         */
811
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
812
+
813
+        // The Publisher Service and the AJAX adapter.
814
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
815
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
816
+
817
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
818
+
819
+        /**
820
+         * Load the WordLift key validation service.
821
+         */
822
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
823
+
824
+        // Load the `Wordlift_Category_Taxonomy_Service` class definition.
825
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
826
+
827
+        // Load the `Wordlift_Entity_Page_Service` class definition.
828
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php';
829
+
830
+        /** Linked Data. */
831
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php';
832
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
833
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
834
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
835
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
836
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
837
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
838
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
839
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
840
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
841
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
842
+
843
+        /** Services. */
844
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php';
845
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php';
846
+
847
+        /** Adapters. */
848
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
849
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
850
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
851
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php';
852
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php';
853
+
854
+        /** Autocomplete. */
855
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php';
856
+
857
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php';
858
+
859
+        /** Analytics */
860
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php';
861
+
862
+        /**
863
+         * The class responsible for defining all actions that occur in the admin area.
864
+         */
865
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
866
+
867
+        /**
868
+         * The class to customize the entity list admin page.
869
+         */
870
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
871
+
872
+        /**
873
+         * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
874
+         */
875
+        global $wp_version;
876
+        if ( version_compare( $wp_version, '5.3', '<' ) ) {
877
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
878
+        } else {
879
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
880
+        }
881
+
882
+        /**
883
+         * The Notice service.
884
+         */
885
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
886
+
887
+        /**
888
+         * The PrimaShop adapter.
889
+         */
890
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
891
+
892
+        /**
893
+         * The WordLift Dashboard service.
894
+         */
895
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
896
+
897
+        /**
898
+         * The admin 'Install wizard' page.
899
+         */
900
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
901
+
902
+        /**
903
+         * The WordLift entity type list admin page controller.
904
+         */
905
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
906
+
907
+        /**
908
+         * The WordLift entity type settings admin page controller.
909
+         */
910
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
911
+
912
+        /**
913
+         * The admin 'Download Your Data' page.
914
+         */
915
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
916
+
917
+        /**
918
+         * The admin 'WordLift Settings' page.
919
+         */
920
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php';
921
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php';
922
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php';
923
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php';
924
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php';
925
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
926
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
927
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
928
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php';
929
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
930
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
931
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
932
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
933
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
934
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
935
+
936
+        /** Admin Pages */
937
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
938
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php';
939
+
940
+        /**
941
+         * The class responsible for defining all actions that occur in the public-facing
942
+         * side of the site.
943
+         */
944
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
945
+
946
+        /**
947
+         * The shortcode abstract class.
948
+         */
949
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
950
+
951
+        /**
952
+         * The Timeline shortcode.
953
+         */
954
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
955
+
956
+        /**
957
+         * The Navigator shortcode.
958
+         */
959
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
960
+
961
+        /**
962
+         * The Products Navigator shortcode.
963
+         */
964
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-products-navigator-shortcode.php';
965
+
966
+        /**
967
+         * The chord shortcode.
968
+         */
969
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
970
+
971
+        /**
972
+         * The geomap shortcode.
973
+         */
974
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
975
+
976
+        /**
977
+         * The entity cloud shortcode.
978
+         */
979
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
980
+
981
+        /**
982
+         * The entity glossary shortcode.
983
+         */
984
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php';
985
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php';
986
+
987
+        /**
988
+         * Faceted Search shortcode.
989
+         */
990
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php';
991
+
992
+        /**
993
+         * The ShareThis service.
994
+         */
995
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
996
+
997
+        /**
998
+         * The SEO service.
999
+         */
1000
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
1001
+
1002
+        /**
1003
+         * The AMP service.
1004
+         */
1005
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
1006
+
1007
+        /** Widgets */
1008
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
1009
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1010
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php';
1011
+
1012
+        /*
1013 1013
 		 * Batch Operations. They're similar to Batch Actions but do not require working on post types.
1014 1014
 		 *
1015 1015
 		 * Eventually Batch Actions will become Batch Operations.
1016 1016
 		 *
1017 1017
 		 * @since 3.20.0
1018 1018
 		 */
1019
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php';
1020
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1019
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php';
1020
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1021 1021
 
1022
-		/*
1022
+        /*
1023 1023
 		 * Schema.org Services.
1024 1024
 		 *
1025 1025
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1026 1026
 		 */
1027
-		if ( apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1028
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1029
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1030
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1031
-			new Wordlift_Schemaorg_Sync_Service();
1032
-			$schemaorg_property_service = Wordlift_Schemaorg_Property_Service::get_instance();
1033
-			new Wordlift_Schemaorg_Class_Service();
1034
-		} else {
1035
-			$schemaorg_property_service = null;
1036
-		}
1037
-
1038
-		$this->loader = new Wordlift_Loader();
1039
-		/**
1040
-		 * @since 3.30.0
1041
-		 */
1042
-		$this->features_registry = Features_Registry::get_instance();
1043
-
1044
-		// Instantiate a global logger.
1045
-		global $wl_logger;
1046
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1047
-
1048
-		// Load the `wl-api` end-point.
1049
-		new Wordlift_Http_Api();
1050
-
1051
-		// Load the Install Service.
1052
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php';
1053
-		$this->install_service = new Wordlift_Install_Service();
1054
-		$this->notice_service  = new Wordlift_Notice_Service();
1055
-		$this->user_service    = Wordlift_User_Service::get_instance();
1056
-		// create an instance of the entity type list admin page controller.
1057
-		$this->entity_type_admin_page        = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1058
-		$this->topic_taxonomy_service        = new Wordlift_Topic_Taxonomy_Service();
1059
-		$this->entity_types_taxonomy_service = new Wordlift_Entity_Type_Taxonomy_Service();
1060
-		// Create an entity type service instance. It'll be later bound to the init action.
1061
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service(
1062
-			Wordlift_Entity_Service::TYPE_NAME, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() );
1063
-		/* WordPress Admin. */
1064
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page();
1065
-		// create an instance of the entity type setting admin page controller.
1066
-		$this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1067
-
1068
-
1069
-		$that = $this;
1070
-		add_action( 'plugins_loaded', function () use ( &$that, $schemaorg_property_service ) {
1071
-
1072
-			/** Services. */
1073
-			// Create the configuration service.
1074
-			$api_service = new Wordlift_Api_Service();
1075
-
1076
-			// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1077
-			$that->entity_link_service = new Wordlift_Entity_Link_Service( $that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() );
1078
-
1079
-			$schema_url_property_service = new Wordlift_Schema_Url_Property_Service();
1080
-
1081
-			$that->entity_uri_service = Wordlift_Entity_Uri_Service::get_instance();
1082
-
1083
-			// Create a new instance of the Redirect service.
1084
-			$that->redirect_service = new Wordlift_Redirect_Service( $that->entity_uri_service );
1085
-
1086
-			// Create a new instance of the Timeline service and Timeline shortcode.
1087
-			$that->timeline_service = new Wordlift_Timeline_Service();
1088
-
1089
-			$that->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
1090
-
1091
-			// Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
1092
-			$that->sharethis_service = new Wordlift_ShareThis_Service();
1093
-
1094
-			// Create an instance of the PrimaShop adapter.
1095
-			$that->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1096
-
1097
-			$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1098
-
1099
-			// Create the entity rating service.
1100
-			$that->rating_service = Wordlift_Rating_Service::get_instance();
1101
-
1102
-			// Create entity list customization (wp-admin/edit.php).
1103
-			$that->entity_list_service = new Wordlift_Entity_List_Service( $that->rating_service );
1104
-
1105
-			// Create an instance of the Publisher Service and the AJAX Adapter.
1106
-			$that->publisher_service = Wordlift_Publisher_Service::get_instance();
1107
-			$that->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1108
-			$that->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1109
-
1110
-			$attachment_service = Wordlift_Attachment_Service::get_instance();
1111
-
1112
-			// Instantiate the JSON-LD service.
1113
-			$property_getter                       = Wordlift_Property_Getter_Factory::create();
1114
-			$that->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1115
-			$that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter );
1116
-			$that->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter );
1117
-			$that->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1118
-
1119
-			$jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1120
-			$that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $that->postid_to_jsonld_converter, $jsonld_cache );
1121
-			/*
1027
+        if ( apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1028
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1029
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1030
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1031
+            new Wordlift_Schemaorg_Sync_Service();
1032
+            $schemaorg_property_service = Wordlift_Schemaorg_Property_Service::get_instance();
1033
+            new Wordlift_Schemaorg_Class_Service();
1034
+        } else {
1035
+            $schemaorg_property_service = null;
1036
+        }
1037
+
1038
+        $this->loader = new Wordlift_Loader();
1039
+        /**
1040
+         * @since 3.30.0
1041
+         */
1042
+        $this->features_registry = Features_Registry::get_instance();
1043
+
1044
+        // Instantiate a global logger.
1045
+        global $wl_logger;
1046
+        $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1047
+
1048
+        // Load the `wl-api` end-point.
1049
+        new Wordlift_Http_Api();
1050
+
1051
+        // Load the Install Service.
1052
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php';
1053
+        $this->install_service = new Wordlift_Install_Service();
1054
+        $this->notice_service  = new Wordlift_Notice_Service();
1055
+        $this->user_service    = Wordlift_User_Service::get_instance();
1056
+        // create an instance of the entity type list admin page controller.
1057
+        $this->entity_type_admin_page        = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1058
+        $this->topic_taxonomy_service        = new Wordlift_Topic_Taxonomy_Service();
1059
+        $this->entity_types_taxonomy_service = new Wordlift_Entity_Type_Taxonomy_Service();
1060
+        // Create an entity type service instance. It'll be later bound to the init action.
1061
+        $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service(
1062
+            Wordlift_Entity_Service::TYPE_NAME, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() );
1063
+        /* WordPress Admin. */
1064
+        $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page();
1065
+        // create an instance of the entity type setting admin page controller.
1066
+        $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1067
+
1068
+
1069
+        $that = $this;
1070
+        add_action( 'plugins_loaded', function () use ( &$that, $schemaorg_property_service ) {
1071
+
1072
+            /** Services. */
1073
+            // Create the configuration service.
1074
+            $api_service = new Wordlift_Api_Service();
1075
+
1076
+            // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1077
+            $that->entity_link_service = new Wordlift_Entity_Link_Service( $that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() );
1078
+
1079
+            $schema_url_property_service = new Wordlift_Schema_Url_Property_Service();
1080
+
1081
+            $that->entity_uri_service = Wordlift_Entity_Uri_Service::get_instance();
1082
+
1083
+            // Create a new instance of the Redirect service.
1084
+            $that->redirect_service = new Wordlift_Redirect_Service( $that->entity_uri_service );
1085
+
1086
+            // Create a new instance of the Timeline service and Timeline shortcode.
1087
+            $that->timeline_service = new Wordlift_Timeline_Service();
1088
+
1089
+            $that->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
1090
+
1091
+            // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
1092
+            $that->sharethis_service = new Wordlift_ShareThis_Service();
1093
+
1094
+            // Create an instance of the PrimaShop adapter.
1095
+            $that->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1096
+
1097
+            $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1098
+
1099
+            // Create the entity rating service.
1100
+            $that->rating_service = Wordlift_Rating_Service::get_instance();
1101
+
1102
+            // Create entity list customization (wp-admin/edit.php).
1103
+            $that->entity_list_service = new Wordlift_Entity_List_Service( $that->rating_service );
1104
+
1105
+            // Create an instance of the Publisher Service and the AJAX Adapter.
1106
+            $that->publisher_service = Wordlift_Publisher_Service::get_instance();
1107
+            $that->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1108
+            $that->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1109
+
1110
+            $attachment_service = Wordlift_Attachment_Service::get_instance();
1111
+
1112
+            // Instantiate the JSON-LD service.
1113
+            $property_getter                       = Wordlift_Property_Getter_Factory::create();
1114
+            $that->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1115
+            $that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter );
1116
+            $that->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter );
1117
+            $that->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1118
+
1119
+            $jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1120
+            $that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $that->postid_to_jsonld_converter, $jsonld_cache );
1121
+            /*
1122 1122
 			 * Load the `Wordlift_Term_JsonLd_Adapter`.
1123 1123
 			 *
1124 1124
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/892
1125 1125
 			 *
1126 1126
 			 * @since 3.20.0
1127 1127
 			 */
1128
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php';
1129
-
1130
-			$term_jsonld_adapter  = new Wordlift_Term_JsonLd_Adapter( $that->entity_uri_service, $that->cached_postid_to_jsonld_converter );
1131
-			$that->jsonld_service = new Wordlift_Jsonld_Service( Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter );
1132
-
1133
-			$jsonld_service = new Jsonld_Service(
1134
-				$that->jsonld_service,
1135
-				$term_jsonld_adapter,
1136
-				new Jsonld_User_Service( $that->user_service ) );
1137
-			new Jsonld_Endpoint( $jsonld_service, $that->entity_uri_service );
1138
-
1139
-			// Prints the JSON-LD in the head.
1140
-			new Jsonld_Adapter( $that->jsonld_service );
1141
-
1142
-			new Jsonld_By_Id_Endpoint( $that->jsonld_service, $that->entity_uri_service );
1143
-
1144
-			/**
1145
-			 * @since 3.37.1
1146
-			 * Add mentions property to the entity.
1147
-			 */
1148
-			new Mentions();
1149
-
1150
-			$that->key_validation_service = new Wordlift_Key_Validation_Service();
1151
-			$that->content_filter_service = Wordlift_Content_Filter_Service::get_instance();
1152
-			// Creating Faq Content filter service.
1153
-			$that->faq_content_filter_service = new Faq_Content_Filter();
1154
-			$that->sample_data_service        = Wordlift_Sample_Data_Service::get_instance();
1155
-			$that->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $that->sample_data_service );
1156
-
1157
-			$that->loader->add_action( 'enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks' );
1158
-			$that->loader->add_action( 'admin_enqueue_scripts', $that, 'add_wl_enabled_blocks' );
1159
-
1160
-			/**
1161
-			 * Filter: wl_feature__enable__blocks.
1162
-			 *
1163
-			 * @param bool whether the blocks needed to be registered, defaults to true.
1164
-			 *
1165
-			 * @return bool
1166
-			 * @since 3.27.6
1167
-			 */
1168
-			if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1169
-				// Initialize the short-codes.
1170
-				new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1171
-				new Wordlift_Chord_Shortcode();
1172
-				new Wordlift_Geomap_Shortcode();
1173
-				new Wordlift_Timeline_Shortcode();
1174
-				new Wordlift_Related_Entities_Cloud_Shortcode( Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance() );
1175
-				new Wordlift_Vocabulary_Shortcode();
1176
-				new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1177
-			}
1178
-
1179
-			new Wordlift_Products_Navigator_Shortcode();
1180
-
1181
-
1182
-			// Initialize the Context Cards Service
1183
-			$that->context_cards_service = new Wordlift_Context_Cards_Service();
1184
-
1185
-			// Initialize the SEO service.
1186
-			new Wordlift_Seo_Service();
1187
-
1188
-			// Initialize the AMP service.
1189
-			new Wordlift_AMP_Service( $that->jsonld_service );
1190
-
1191
-			/** Services. */
1192
-			$that->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1193
-			new Wordlift_Image_Service();
1194
-
1195
-			/** Adapters. */
1196
-			$that->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( Wordlift_Entity_Type_Service::get_instance() );
1197
-			$that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $that->publisher_service );
1198
-			$that->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $that );
1199
-
1200
-			/*
1128
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php';
1129
+
1130
+            $term_jsonld_adapter  = new Wordlift_Term_JsonLd_Adapter( $that->entity_uri_service, $that->cached_postid_to_jsonld_converter );
1131
+            $that->jsonld_service = new Wordlift_Jsonld_Service( Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter );
1132
+
1133
+            $jsonld_service = new Jsonld_Service(
1134
+                $that->jsonld_service,
1135
+                $term_jsonld_adapter,
1136
+                new Jsonld_User_Service( $that->user_service ) );
1137
+            new Jsonld_Endpoint( $jsonld_service, $that->entity_uri_service );
1138
+
1139
+            // Prints the JSON-LD in the head.
1140
+            new Jsonld_Adapter( $that->jsonld_service );
1141
+
1142
+            new Jsonld_By_Id_Endpoint( $that->jsonld_service, $that->entity_uri_service );
1143
+
1144
+            /**
1145
+             * @since 3.37.1
1146
+             * Add mentions property to the entity.
1147
+             */
1148
+            new Mentions();
1149
+
1150
+            $that->key_validation_service = new Wordlift_Key_Validation_Service();
1151
+            $that->content_filter_service = Wordlift_Content_Filter_Service::get_instance();
1152
+            // Creating Faq Content filter service.
1153
+            $that->faq_content_filter_service = new Faq_Content_Filter();
1154
+            $that->sample_data_service        = Wordlift_Sample_Data_Service::get_instance();
1155
+            $that->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $that->sample_data_service );
1156
+
1157
+            $that->loader->add_action( 'enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks' );
1158
+            $that->loader->add_action( 'admin_enqueue_scripts', $that, 'add_wl_enabled_blocks' );
1159
+
1160
+            /**
1161
+             * Filter: wl_feature__enable__blocks.
1162
+             *
1163
+             * @param bool whether the blocks needed to be registered, defaults to true.
1164
+             *
1165
+             * @return bool
1166
+             * @since 3.27.6
1167
+             */
1168
+            if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1169
+                // Initialize the short-codes.
1170
+                new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1171
+                new Wordlift_Chord_Shortcode();
1172
+                new Wordlift_Geomap_Shortcode();
1173
+                new Wordlift_Timeline_Shortcode();
1174
+                new Wordlift_Related_Entities_Cloud_Shortcode( Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance() );
1175
+                new Wordlift_Vocabulary_Shortcode();
1176
+                new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1177
+            }
1178
+
1179
+            new Wordlift_Products_Navigator_Shortcode();
1180
+
1181
+
1182
+            // Initialize the Context Cards Service
1183
+            $that->context_cards_service = new Wordlift_Context_Cards_Service();
1184
+
1185
+            // Initialize the SEO service.
1186
+            new Wordlift_Seo_Service();
1187
+
1188
+            // Initialize the AMP service.
1189
+            new Wordlift_AMP_Service( $that->jsonld_service );
1190
+
1191
+            /** Services. */
1192
+            $that->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1193
+            new Wordlift_Image_Service();
1194
+
1195
+            /** Adapters. */
1196
+            $that->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( Wordlift_Entity_Type_Service::get_instance() );
1197
+            $that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $that->publisher_service );
1198
+            $that->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $that );
1199
+
1200
+            /*
1201 1201
 			 * Exclude our public js from WP-Rocket.
1202 1202
 			 *
1203 1203
 			 * @since 3.19.4
1204 1204
 			 *
1205 1205
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/842.
1206 1206
 			 */
1207
-			new Wordlift_WpRocket_Adapter();
1207
+            new Wordlift_WpRocket_Adapter();
1208 1208
 
1209
-			/** WordPress Admin UI. */
1209
+            /** WordPress Admin UI. */
1210 1210
 
1211
-			// UI elements.
1212
-			$that->input_element           = new Wordlift_Admin_Input_Element();
1213
-			$that->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1214
-			$that->select2_element         = new Wordlift_Admin_Select2_Element();
1215
-			$that->language_select_element = new Wordlift_Admin_Language_Select_Element();
1216
-			$that->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1217
-			$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1218
-			$that->publisher_element       = new Wordlift_Admin_Publisher_Element( $that->publisher_service, $tabs_element, $that->select2_element );
1219
-			$that->author_element          = new Wordlift_Admin_Author_Element( $that->publisher_service, $that->select2_element );
1211
+            // UI elements.
1212
+            $that->input_element           = new Wordlift_Admin_Input_Element();
1213
+            $that->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1214
+            $that->select2_element         = new Wordlift_Admin_Select2_Element();
1215
+            $that->language_select_element = new Wordlift_Admin_Language_Select_Element();
1216
+            $that->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1217
+            $tabs_element                  = new Wordlift_Admin_Tabs_Element();
1218
+            $that->publisher_element       = new Wordlift_Admin_Publisher_Element( $that->publisher_service, $tabs_element, $that->select2_element );
1219
+            $that->author_element          = new Wordlift_Admin_Author_Element( $that->publisher_service, $that->select2_element );
1220 1220
 
1221
-			$that->settings_page             = Wordlift_Admin_Settings_Page::get_instance();
1222
-			$that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $that->settings_page );
1221
+            $that->settings_page             = Wordlift_Admin_Settings_Page::get_instance();
1222
+            $that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $that->settings_page );
1223 1223
 
1224
-			$that->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $that->input_element, $that->radio_input_element );
1225
-			$that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $that->analytics_settings_page );
1226
-			$that->analytics_connect                   = new Wordlift_Analytics_Connect();
1224
+            $that->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $that->input_element, $that->radio_input_element );
1225
+            $that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $that->analytics_settings_page );
1226
+            $that->analytics_connect                   = new Wordlift_Analytics_Connect();
1227 1227
 
1228
-			// Pages.
1229
-			/*
1228
+            // Pages.
1229
+            /*
1230 1230
 			 * Call the `wl_can_see_classification_box` filter to determine whether we can display the classification box.
1231 1231
 			 *
1232 1232
 			 * @since 3.20.3
1233 1233
 			 *
1234 1234
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/914
1235 1235
 			 */
1236
-			if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1237
-				require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
1238
-				new Wordlift_Admin_Post_Edit_Page( $that );
1239
-			}
1240
-			new Wordlift_Entity_Type_Admin_Service();
1236
+            if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1237
+                require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
1238
+                new Wordlift_Admin_Post_Edit_Page( $that );
1239
+            }
1240
+            new Wordlift_Entity_Type_Admin_Service();
1241 1241
 
1242
-			/** Widgets */
1243
-			$that->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1242
+            /** Widgets */
1243
+            $that->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1244 1244
 
1245
-			// Create an instance of the install wizard.
1246
-			$that->admin_setup = new Wordlift_Admin_Setup( $that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element );
1245
+            // Create an instance of the install wizard.
1246
+            $that->admin_setup = new Wordlift_Admin_Setup( $that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element );
1247 1247
 
1248
-			$that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $that->entity_post_type_service );
1248
+            $that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $that->entity_post_type_service );
1249 1249
 
1250
-			// User Profile.
1251
-			new Wordlift_Admin_User_Profile_Page( $that->author_element, $that->user_service );
1250
+            // User Profile.
1251
+            new Wordlift_Admin_User_Profile_Page( $that->author_element, $that->user_service );
1252 1252
 
1253
-			$that->entity_page_service = new Wordlift_Entity_Page_Service();
1253
+            $that->entity_page_service = new Wordlift_Entity_Page_Service();
1254 1254
 
1255
-			// Load the debug service if WP is in debug mode.
1256
-			if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1257
-				require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1258
-				new Wordlift_Debug_Service( Wordlift_Entity_Service::get_instance(), $uri_service );
1259
-			}
1255
+            // Load the debug service if WP is in debug mode.
1256
+            if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1257
+                require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1258
+                new Wordlift_Debug_Service( Wordlift_Entity_Service::get_instance(), $uri_service );
1259
+            }
1260 1260
 
1261
-			// Remote Image Service.
1262
-			new Wordlift_Remote_Image_Service();
1261
+            // Remote Image Service.
1262
+            new Wordlift_Remote_Image_Service();
1263 1263
 
1264
-			/*
1264
+            /*
1265 1265
 			 * Provides mappings between post types and entity types.
1266 1266
 			 *
1267 1267
 			 * @since 3.20.0
1268 1268
 			 *
1269 1269
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/852.
1270 1270
 			 */
1271
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php';
1272
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php';
1273
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1271
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php';
1272
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php';
1273
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1274 1274
 
1275
-			// Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1276
-			new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1275
+            // Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1276
+            new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1277 1277
 
1278
-			/*
1278
+            /*
1279 1279
 			 * Load the Mappings JSON-LD post processing.
1280 1280
 			 *
1281 1281
 			 * @since 3.25.0
1282 1282
 			 */
1283 1283
 
1284
-			$mappings_dbo           = new Mappings_DBO();
1285
-			$default_rule_validator = new Taxonomy_Rule_Validator();
1286
-			new Post_Type_Rule_Validator();
1287
-			// Taxonomy term rule validator for validating rules for term pages.
1288
-			new Taxonomy_Term_Rule_Validator();
1289
-			new Post_Taxonomy_Term_Rule_Validator();
1290
-			$rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1291
-			$rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1292
-			$mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1293
-
1294
-			new Url_To_Entity_Transform_Function( $that->entity_uri_service );
1295
-			new Taxonomy_To_Terms_Transform_Function();
1296
-			new Post_Id_To_Entity_Transform_Function();
1297
-			$mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
1298
-
1299
-			/**
1300
-			 * @since 3.27.1
1301
-			 * Intiailize the acf group data formatter.
1302
-			 */
1303
-			new Acf_Group_Formatter();
1304
-			new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1305
-
1306
-			/**
1307
-			 * @since 3.26.0
1308
-			 * Initialize the Faq JSON LD converter here - disabled.
1309
-			 */
1310
-			// new Faq_To_Jsonld_Converter();
1311
-			/*
1284
+            $mappings_dbo           = new Mappings_DBO();
1285
+            $default_rule_validator = new Taxonomy_Rule_Validator();
1286
+            new Post_Type_Rule_Validator();
1287
+            // Taxonomy term rule validator for validating rules for term pages.
1288
+            new Taxonomy_Term_Rule_Validator();
1289
+            new Post_Taxonomy_Term_Rule_Validator();
1290
+            $rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1291
+            $rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1292
+            $mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1293
+
1294
+            new Url_To_Entity_Transform_Function( $that->entity_uri_service );
1295
+            new Taxonomy_To_Terms_Transform_Function();
1296
+            new Post_Id_To_Entity_Transform_Function();
1297
+            $mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
1298
+
1299
+            /**
1300
+             * @since 3.27.1
1301
+             * Intiailize the acf group data formatter.
1302
+             */
1303
+            new Acf_Group_Formatter();
1304
+            new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1305
+
1306
+            /**
1307
+             * @since 3.26.0
1308
+             * Initialize the Faq JSON LD converter here - disabled.
1309
+             */
1310
+            // new Faq_To_Jsonld_Converter();
1311
+            /*
1312 1312
 			 * Use the Templates Ajax Endpoint to load HTML templates for the legacy Angular app via admin-ajax.php
1313 1313
 			 * end-point.
1314 1314
 			 *
1315 1315
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/834
1316 1316
 			 * @since 3.24.4
1317 1317
 			 */
1318
-			new Templates_Ajax_Endpoint();
1319
-			// Call this static method to register FAQ routes to rest api - disabled
1320
-			//Faq_Rest_Controller::register_routes();
1321
-
1322
-			$that->storage_factory = new Wordlift_Storage_Factory( Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter );
1323
-
1324
-			/** WL Autocomplete. */
1325
-			$autocomplete_service       = new All_Autocomplete_Service( array(
1326
-				new Local_Autocomplete_Service(),
1327
-				new Linked_Data_Autocomplete_Service( Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance() ),
1328
-			) );
1329
-			$that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1330
-
1331
-			/**
1332
-			 * @since 3.27.2
1333
-			 * Integrate the recipe maker jsonld & set recipe
1334
-			 * as default entity type to the wprm_recipe CPT.
1335
-			 */
1336
-			new Recipe_Maker_Post_Type_Hook();
1337
-			$recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1338
-			new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1339
-			new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1340
-			new Recipe_Maker_Jsonld_Swap( $recipe_maker_validation_service, $that->jsonld_service );
1341
-			new Recipe_Maker_Warning( $recipe_maker_validation_service );
1342
-
1343
-
1344
-			new Duplicate_Markup_Remover();
1345
-
1346
-			/**
1347
-			 * @since 3.27.8
1348
-			 * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1349
-			 */
1350
-			new Key_Validation_Notice( $that->key_validation_service, Wordlift_Configuration_Service::get_instance() );
1351
-			/**
1352
-			 * @since 3.28.0
1353
-			 * @see https://github.com/insideout10/wordlift-plugin/issues?q=assignee%3Anaveen17797+is%3Aopen
1354
-			 */
1355
-			new Entity_No_Index_Flag();
1356
-
1357
-			/**
1358
-			 * @since 3.29.0
1359
-			 * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1360
-			 */
1361
-			new Entity_Rest_Service( Wordlift_Entity_Type_Service::get_instance() );
1362
-
1363
-			/**
1364
-			 * Expand author in to references.
1365
-			 * @since 3.30.0
1366
-			 * @see https://github.com/insideout10/wordlift-plugin/issues/1318
1367
-			 */
1368
-
1369
-
1370
-			if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1371
-				new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1372
-			}
1373
-
1374
-
1375
-			if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1376
-				$vocabulary_loader = new Vocabulary_Loader();
1377
-				$vocabulary_loader->init_vocabulary();
1378
-			}
1379
-
1380
-			/**
1381
-			 *Added for feature request 1496 (Webhooks)
1382
-			 */
1383
-			if ( apply_filters( 'wl_feature__enable__webhooks', false ) ) {
1384
-				$that->webhook_loader = new Webhooks_Loader();
1385
-				$that->webhook_loader->init();
1386
-			}
1387
-
1388
-			/**
1389
-			 * @since 3.30.0
1390
-			 * Add a checkbox to user option screen for wordlift admin.
1391
-			 */
1392
-			$wordlift_admin_checkbox = new Admin_User_Option();
1393
-			$wordlift_admin_checkbox->connect_hook();
1394
-
1395
-			/**
1396
-			 * @since 3.31.0
1397
-			 * Init loader class for videoobject.
1398
-			 */
1399
-			$videoobject_loader = new Loader();
1400
-			$videoobject_loader->init_feature();
1401
-
1402
-			/**
1403
-			 * @since 3.35.0
1404
-			 */
1405
-			$google_addon_integration_loader = new \Wordlift\Google_Addon_Integration\Loader();
1406
-			$google_addon_integration_loader->init_feature();
1407
-
1408
-			/**
1409
-			 * @since 3.31.5
1410
-			 * Create configuration endpoint for webapp to configure.
1411
-			 */
1412
-			new Config( $that->admin_setup, $that->key_validation_service );
1413
-			/**
1414
-			 * @since 3.31.7
1415
-			 * Remove duplicate videoobject.
1416
-			 */
1417
-			new Videoobject_Duplicate_Remover();
1418
-			$synonym_loader = new \Wordlift\Synonym\Loader();
1419
-			$synonym_loader->init_feature();
1420
-			/**
1421
-			 * @since 3.32.0
1422
-			 * Create loader for vocabulary terms.
1423
-			 */
1424
-			$vocabulary_terms_loader = new Vocabulary_Terms_Loader( Wordlift_Entity_Type_Service::get_instance(), $property_getter );
1425
-			$vocabulary_terms_loader->init_feature();
1426
-
1427
-			new Entity_Type_Change_Handler(
1428
-				Wordlift_Entity_Service::get_instance(),
1429
-				Wordlift_Entity_Type_Service::get_instance()
1430
-			);
1431
-
1432
-		}, 3 );
1433
-
1434
-
1435
-		new Entity_Type_Setter();
1436
-		$no_editor_analysis_loader = new \Wordlift\No_Editor_Analysis\Loader();
1437
-		$no_editor_analysis_loader->init_feature();
1438
-	}
1439
-
1440
-	/**
1441
-	 * Define the locale for this plugin for internationalization.
1442
-	 *
1443
-	 * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1444
-	 * with WordPress.
1445
-	 *
1446
-	 * @since    1.0.0
1447
-	 * @access   private
1448
-	 */
1449
-	private function set_locale() {
1450
-
1451
-		$plugin_i18n = new Wordlift_i18n();
1452
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1453
-
1454
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1455
-
1456
-	}
1457
-
1458
-	/**
1459
-	 * Register all of the hooks related to the admin area functionality
1460
-	 * of the plugin.
1461
-	 *
1462
-	 * @since    1.0.0
1463
-	 * @access   private
1464
-	 */
1465
-	private function define_admin_hooks( $that ) {
1466
-		$plugin_admin = new
1467
-		Wordlift_Admin(
1468
-			$that->get_plugin_name(),
1469
-			$that->get_version(),
1470
-			$that->notice_service,
1471
-			$that->user_service
1472
-		);
1473
-
1474
-		$that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1475
-		$that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1476
-
1477
-		// Hook the `admin_init` function to the Admin Setup.
1478
-		Assertions::is_set( $that->admin_setup, '`admin_setup` must be set' );
1479
-		$that->loader->add_action( 'admin_init', $that->admin_setup, 'admin_init' );
1480
-
1481
-		// Hook the admin_init to the settings page.
1482
-		Assertions::is_set( $that->settings_page, '`setting_page` must be set' );
1483
-		$that->loader->add_action( 'admin_init', $that->settings_page, 'admin_init' );
1484
-
1485
-		// Hook the admin_init to the analytics settings page.
1486
-		Assertions::is_set( $that->analytics_settings_page, '`analytics_setting_page` must be set' );
1487
-		$that->loader->add_action( 'admin_init', $that->analytics_settings_page, 'admin_init' );
1488
-
1489
-		// Hook the init action to taxonomy services.
1490
-		$that->loader->add_action( 'init', $that->topic_taxonomy_service, 'init', 0 );
1491
-		$that->loader->add_action( 'init', $that->entity_types_taxonomy_service, 'init', 0 );
1492
-
1493
-		// Hook the AJAX wl_timeline action to the Timeline service.
1494
-		$that->loader->add_action( 'wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1495
-
1496
-		// Register custom allowed redirect hosts.
1497
-		$that->loader->add_filter( 'allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts' );
1498
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1499
-		$that->loader->add_action( 'wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect' );
1500
-
1501
-		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1502
-		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1503
-		$that->loader->add_action( 'save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 3 );
1504
-		$that->loader->add_action( 'save_post', $that->rating_service, 'set_rating_for', 20, 1 );
1505
-
1506
-		$that->loader->add_action( 'edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1 );
1507
-		$that->loader->add_action( 'in_admin_header', $that->rating_service, 'in_admin_header' );
1508
-
1509
-		// Entity listing customization (wp-admin/edit.php)
1510
-		// Add custom columns.
1511
-		$that->loader->add_filter( 'manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns' );
1512
-		// no explicit entity as it prevents handling of other post types.
1513
-		$that->loader->add_filter( 'manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2 );
1514
-		// Add 4W selection.
1515
-		$that->loader->add_action( 'restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope' );
1516
-		$that->loader->add_filter( 'posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope' );
1517
-		$that->loader->add_action( 'pre_get_posts', $that->entity_list_service, 'pre_get_posts' );
1518
-		$that->loader->add_action( 'load-edit.php', $that->entity_list_service, 'load_edit' );
1519
-
1520
-		/*
1318
+            new Templates_Ajax_Endpoint();
1319
+            // Call this static method to register FAQ routes to rest api - disabled
1320
+            //Faq_Rest_Controller::register_routes();
1321
+
1322
+            $that->storage_factory = new Wordlift_Storage_Factory( Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter );
1323
+
1324
+            /** WL Autocomplete. */
1325
+            $autocomplete_service       = new All_Autocomplete_Service( array(
1326
+                new Local_Autocomplete_Service(),
1327
+                new Linked_Data_Autocomplete_Service( Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance() ),
1328
+            ) );
1329
+            $that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1330
+
1331
+            /**
1332
+             * @since 3.27.2
1333
+             * Integrate the recipe maker jsonld & set recipe
1334
+             * as default entity type to the wprm_recipe CPT.
1335
+             */
1336
+            new Recipe_Maker_Post_Type_Hook();
1337
+            $recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1338
+            new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1339
+            new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1340
+            new Recipe_Maker_Jsonld_Swap( $recipe_maker_validation_service, $that->jsonld_service );
1341
+            new Recipe_Maker_Warning( $recipe_maker_validation_service );
1342
+
1343
+
1344
+            new Duplicate_Markup_Remover();
1345
+
1346
+            /**
1347
+             * @since 3.27.8
1348
+             * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1349
+             */
1350
+            new Key_Validation_Notice( $that->key_validation_service, Wordlift_Configuration_Service::get_instance() );
1351
+            /**
1352
+             * @since 3.28.0
1353
+             * @see https://github.com/insideout10/wordlift-plugin/issues?q=assignee%3Anaveen17797+is%3Aopen
1354
+             */
1355
+            new Entity_No_Index_Flag();
1356
+
1357
+            /**
1358
+             * @since 3.29.0
1359
+             * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1360
+             */
1361
+            new Entity_Rest_Service( Wordlift_Entity_Type_Service::get_instance() );
1362
+
1363
+            /**
1364
+             * Expand author in to references.
1365
+             * @since 3.30.0
1366
+             * @see https://github.com/insideout10/wordlift-plugin/issues/1318
1367
+             */
1368
+
1369
+
1370
+            if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1371
+                new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1372
+            }
1373
+
1374
+
1375
+            if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1376
+                $vocabulary_loader = new Vocabulary_Loader();
1377
+                $vocabulary_loader->init_vocabulary();
1378
+            }
1379
+
1380
+            /**
1381
+             *Added for feature request 1496 (Webhooks)
1382
+             */
1383
+            if ( apply_filters( 'wl_feature__enable__webhooks', false ) ) {
1384
+                $that->webhook_loader = new Webhooks_Loader();
1385
+                $that->webhook_loader->init();
1386
+            }
1387
+
1388
+            /**
1389
+             * @since 3.30.0
1390
+             * Add a checkbox to user option screen for wordlift admin.
1391
+             */
1392
+            $wordlift_admin_checkbox = new Admin_User_Option();
1393
+            $wordlift_admin_checkbox->connect_hook();
1394
+
1395
+            /**
1396
+             * @since 3.31.0
1397
+             * Init loader class for videoobject.
1398
+             */
1399
+            $videoobject_loader = new Loader();
1400
+            $videoobject_loader->init_feature();
1401
+
1402
+            /**
1403
+             * @since 3.35.0
1404
+             */
1405
+            $google_addon_integration_loader = new \Wordlift\Google_Addon_Integration\Loader();
1406
+            $google_addon_integration_loader->init_feature();
1407
+
1408
+            /**
1409
+             * @since 3.31.5
1410
+             * Create configuration endpoint for webapp to configure.
1411
+             */
1412
+            new Config( $that->admin_setup, $that->key_validation_service );
1413
+            /**
1414
+             * @since 3.31.7
1415
+             * Remove duplicate videoobject.
1416
+             */
1417
+            new Videoobject_Duplicate_Remover();
1418
+            $synonym_loader = new \Wordlift\Synonym\Loader();
1419
+            $synonym_loader->init_feature();
1420
+            /**
1421
+             * @since 3.32.0
1422
+             * Create loader for vocabulary terms.
1423
+             */
1424
+            $vocabulary_terms_loader = new Vocabulary_Terms_Loader( Wordlift_Entity_Type_Service::get_instance(), $property_getter );
1425
+            $vocabulary_terms_loader->init_feature();
1426
+
1427
+            new Entity_Type_Change_Handler(
1428
+                Wordlift_Entity_Service::get_instance(),
1429
+                Wordlift_Entity_Type_Service::get_instance()
1430
+            );
1431
+
1432
+        }, 3 );
1433
+
1434
+
1435
+        new Entity_Type_Setter();
1436
+        $no_editor_analysis_loader = new \Wordlift\No_Editor_Analysis\Loader();
1437
+        $no_editor_analysis_loader->init_feature();
1438
+    }
1439
+
1440
+    /**
1441
+     * Define the locale for this plugin for internationalization.
1442
+     *
1443
+     * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1444
+     * with WordPress.
1445
+     *
1446
+     * @since    1.0.0
1447
+     * @access   private
1448
+     */
1449
+    private function set_locale() {
1450
+
1451
+        $plugin_i18n = new Wordlift_i18n();
1452
+        $plugin_i18n->set_domain( $this->get_plugin_name() );
1453
+
1454
+        $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1455
+
1456
+    }
1457
+
1458
+    /**
1459
+     * Register all of the hooks related to the admin area functionality
1460
+     * of the plugin.
1461
+     *
1462
+     * @since    1.0.0
1463
+     * @access   private
1464
+     */
1465
+    private function define_admin_hooks( $that ) {
1466
+        $plugin_admin = new
1467
+        Wordlift_Admin(
1468
+            $that->get_plugin_name(),
1469
+            $that->get_version(),
1470
+            $that->notice_service,
1471
+            $that->user_service
1472
+        );
1473
+
1474
+        $that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1475
+        $that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1476
+
1477
+        // Hook the `admin_init` function to the Admin Setup.
1478
+        Assertions::is_set( $that->admin_setup, '`admin_setup` must be set' );
1479
+        $that->loader->add_action( 'admin_init', $that->admin_setup, 'admin_init' );
1480
+
1481
+        // Hook the admin_init to the settings page.
1482
+        Assertions::is_set( $that->settings_page, '`setting_page` must be set' );
1483
+        $that->loader->add_action( 'admin_init', $that->settings_page, 'admin_init' );
1484
+
1485
+        // Hook the admin_init to the analytics settings page.
1486
+        Assertions::is_set( $that->analytics_settings_page, '`analytics_setting_page` must be set' );
1487
+        $that->loader->add_action( 'admin_init', $that->analytics_settings_page, 'admin_init' );
1488
+
1489
+        // Hook the init action to taxonomy services.
1490
+        $that->loader->add_action( 'init', $that->topic_taxonomy_service, 'init', 0 );
1491
+        $that->loader->add_action( 'init', $that->entity_types_taxonomy_service, 'init', 0 );
1492
+
1493
+        // Hook the AJAX wl_timeline action to the Timeline service.
1494
+        $that->loader->add_action( 'wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1495
+
1496
+        // Register custom allowed redirect hosts.
1497
+        $that->loader->add_filter( 'allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts' );
1498
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1499
+        $that->loader->add_action( 'wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect' );
1500
+
1501
+        // Hook save_post to the entity service to update custom fields (such as alternate labels).
1502
+        // We have a priority of 9 because we want to be executed before data is sent to Redlink.
1503
+        $that->loader->add_action( 'save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 3 );
1504
+        $that->loader->add_action( 'save_post', $that->rating_service, 'set_rating_for', 20, 1 );
1505
+
1506
+        $that->loader->add_action( 'edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1 );
1507
+        $that->loader->add_action( 'in_admin_header', $that->rating_service, 'in_admin_header' );
1508
+
1509
+        // Entity listing customization (wp-admin/edit.php)
1510
+        // Add custom columns.
1511
+        $that->loader->add_filter( 'manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns' );
1512
+        // no explicit entity as it prevents handling of other post types.
1513
+        $that->loader->add_filter( 'manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2 );
1514
+        // Add 4W selection.
1515
+        $that->loader->add_action( 'restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope' );
1516
+        $that->loader->add_filter( 'posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope' );
1517
+        $that->loader->add_action( 'pre_get_posts', $that->entity_list_service, 'pre_get_posts' );
1518
+        $that->loader->add_action( 'load-edit.php', $that->entity_list_service, 'load_edit' );
1519
+
1520
+        /*
1521 1521
 		 * If `All Entity Types` is disable, use the radio button Walker.
1522 1522
 		 *
1523 1523
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1524 1524
 		 */
1525
-		if ( ! apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1526
-			$that->loader->add_filter( 'wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args' );
1527
-		}
1528
-
1529
-		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1530
-		// entities.
1531
-		$that->loader->add_filter( 'prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1532
-
1533
-		/**
1534
-		 * Filter: wl_feature__enable__settings-download.
1535
-		 *
1536
-		 * @param bool whether the screens needed to be registered, defaults to true.
1537
-		 *
1538
-		 * @return bool
1539
-		 * @since 3.27.6
1540
-		 */
1541
-		$that->features_registry->register_feature_from_slug( 'settings-download', true, array(
1542
-			$that,
1543
-			'register_screens'
1544
-		) );
1545
-
1546
-
1547
-		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1548
-		$that->loader->add_action( 'wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10 );
1549
-
1550
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1551
-		$that->loader->add_action( 'wp_ajax_wl_jsonld', $that->jsonld_service, 'get' );
1552
-		$that->loader->add_action( 'admin_post_wl_jsonld', $that->jsonld_service, 'get' );
1553
-		$that->loader->add_action( 'admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1554
-
1555
-		// Hook the AJAX wl_validate_key action to the Key Validation service.
1556
-		$that->loader->add_action( 'wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key' );
1557
-
1558
-		// Hook the AJAX wl_update_country_options action to the countries.
1559
-		$that->loader->add_action( 'wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html' );
1560
-
1561
-		$that->loader->add_filter( 'admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction' );
1562
-
1563
-		// Hook the menu creation on the general wordlift menu creation.
1564
-		/**
1565
-		 * Filter: wl_feature__enable__screens.
1566
-		 *
1567
-		 * @param bool whether the screens needed to be registered, defaults to true.
1568
-		 *
1569
-		 * @return bool
1570
-		 * @since 3.27.6
1571
-		 *
1572
-		 * Since 3.30.0 this feature is registered using registry.
1573
-		 */
1574
-		if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1575
-			add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1576
-		}
1577
-
1578
-		// Hook key update.
1579
-		$that->loader->add_action( 'pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2 );
1580
-		$that->loader->add_action( 'update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2 );
1581
-
1582
-		// Add additional action links to the WordLift plugin in the plugins page.
1583
-		$that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1 );
1584
-
1585
-		/*
1525
+        if ( ! apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1526
+            $that->loader->add_filter( 'wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args' );
1527
+        }
1528
+
1529
+        // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1530
+        // entities.
1531
+        $that->loader->add_filter( 'prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1532
+
1533
+        /**
1534
+         * Filter: wl_feature__enable__settings-download.
1535
+         *
1536
+         * @param bool whether the screens needed to be registered, defaults to true.
1537
+         *
1538
+         * @return bool
1539
+         * @since 3.27.6
1540
+         */
1541
+        $that->features_registry->register_feature_from_slug( 'settings-download', true, array(
1542
+            $that,
1543
+            'register_screens'
1544
+        ) );
1545
+
1546
+
1547
+        // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1548
+        $that->loader->add_action( 'wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10 );
1549
+
1550
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1551
+        $that->loader->add_action( 'wp_ajax_wl_jsonld', $that->jsonld_service, 'get' );
1552
+        $that->loader->add_action( 'admin_post_wl_jsonld', $that->jsonld_service, 'get' );
1553
+        $that->loader->add_action( 'admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1554
+
1555
+        // Hook the AJAX wl_validate_key action to the Key Validation service.
1556
+        $that->loader->add_action( 'wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key' );
1557
+
1558
+        // Hook the AJAX wl_update_country_options action to the countries.
1559
+        $that->loader->add_action( 'wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html' );
1560
+
1561
+        $that->loader->add_filter( 'admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction' );
1562
+
1563
+        // Hook the menu creation on the general wordlift menu creation.
1564
+        /**
1565
+         * Filter: wl_feature__enable__screens.
1566
+         *
1567
+         * @param bool whether the screens needed to be registered, defaults to true.
1568
+         *
1569
+         * @return bool
1570
+         * @since 3.27.6
1571
+         *
1572
+         * Since 3.30.0 this feature is registered using registry.
1573
+         */
1574
+        if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1575
+            add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1576
+        }
1577
+
1578
+        // Hook key update.
1579
+        $that->loader->add_action( 'pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2 );
1580
+        $that->loader->add_action( 'update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2 );
1581
+
1582
+        // Add additional action links to the WordLift plugin in the plugins page.
1583
+        $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1 );
1584
+
1585
+        /*
1586 1586
 		 * Remove the Analytics Settings link from the plugin page.
1587 1587
 		 *
1588 1588
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/932
1589 1589
 		 * @since 3.21.1
1590 1590
 		 */
1591
-		// $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->analytics_settings_page_action_link, 'action_links', 10, 1 );
1592
-
1593
-		// Hook the AJAX `wl_publisher` action name.
1594
-		$that->loader->add_action( 'wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher' );
1595
-
1596
-		// Hook row actions for the entity type list admin.
1597
-		$that->loader->add_filter( 'wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1598
-
1599
-		/** Ajax actions. */
1600
-		$that->loader->add_action( 'wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export' );
1601
-
1602
-		// Hook capabilities manipulation to allow access to entity type admin
1603
-		// page  on WordPress versions before 4.7.
1604
-		global $wp_version;
1605
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1606
-			$that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1607
-		}
1608
-
1609
-		/** Adapters. */
1610
-		$that->loader->add_filter( 'mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1611
-		/**
1612
-		 * Disabling Faq temporarily.
1613
-		 * Load the tinymce editor button on the tool bar.
1614
-		 * @since 3.26.0
1615
-		 */
1616
-		//$that->loader->add_filter( 'tiny_mce_before_init', $that->faq_tinymce_adapter, 'register_custom_tags' );
1617
-		//$that->loader->add_filter( 'mce_buttons', $that->faq_tinymce_adapter, 'register_faq_toolbar_button', 10, 1 );
1618
-		//$that->loader->add_filter( 'mce_external_plugins', $that->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1619
-
1620
-
1621
-		$that->loader->add_action( 'wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create' );
1622
-		$that->loader->add_action( 'wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete' );
1623
-
1624
-		/**
1625
-		 * @since 3.26.0
1626
-		 */
1627
-		$excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1628
-		$that->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1629
-		// Adding Rest route for the post excerpt
1630
-		Post_Excerpt_Rest_Controller::register_routes();
1631
-
1632
-		// Handle the autocomplete request.
1633
-		add_action( 'wp_ajax_wl_autocomplete', array(
1634
-			$that->autocomplete_adapter,
1635
-			'wl_autocomplete',
1636
-		) );
1637
-		add_action( 'wp_ajax_nopriv_wl_autocomplete', array(
1638
-			$that->autocomplete_adapter,
1639
-			'wl_autocomplete',
1640
-		) );
1641
-
1642
-		// Hooks to restrict multisite super admin from manipulating entity types.
1643
-		if ( is_multisite() ) {
1644
-			$that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1645
-		}
1646
-
1647
-		$deactivator_feedback = new Wordlift_Deactivator_Feedback();
1648
-
1649
-		add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1650
-		add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1651
-		add_action( 'wp_ajax_wl_deactivation_feedback', array(
1652
-			$deactivator_feedback,
1653
-			'wl_deactivation_feedback'
1654
-		) );
1655
-
1656
-		/**
1657
-		 * Always allow the `wordlift/classification` block.
1658
-		 *
1659
-		 * @since 3.23.0
1660
-		 */
1661
-		add_filter( 'allowed_block_types', function ( $value ) {
1662
-
1663
-			if ( true === $value ) {
1664
-				return $value;
1665
-			}
1666
-
1667
-			return array_merge( (array) $value, array( 'wordlift/classification' ) );
1668
-		}, PHP_INT_MAX );
1669
-
1670
-		/**
1671
-		 * @since 3.27.7
1672
-		 * @see https://github.com/insideout10/wordlift-plugin/issues/1214
1673
-		 */
1674
-		new Top_Entities();
1675
-
1676
-	}
1677
-
1678
-	/**
1679
-	 * Register all of the hooks related to the public-facing functionality
1680
-	 * of the plugin.
1681
-	 *
1682
-	 * @since    1.0.0
1683
-	 * @access   private
1684
-	 */
1685
-	private function define_public_hooks( $that ) {
1686
-
1687
-		$plugin_public = new Wordlift_Public( $that->get_plugin_name(), $that->get_version() );
1688
-
1689
-		// Register the entity post type.
1690
-		$that->loader->add_action( 'init', $that->entity_post_type_service, 'register' );
1691
-
1692
-		// Bind the link generation and handling hooks to the entity link service.
1693
-		$that->loader->add_filter( 'post_type_link', $that->entity_link_service, 'post_type_link', 10, 4 );
1694
-		$that->loader->add_action( 'pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1695
-		// $that->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $that->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 );
1696
-		// $that->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $that->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 );
1697
-
1698
-		$that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1699
-		$that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1700
-		$that->loader->add_action( 'wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts' );
1701
-
1702
-		// Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1703
-		$that->loader->add_filter( 'the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1704
-		// Hook the content filter service to add entity links.
1705
-		if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1706
-			// We run before other filters.
1707
-			$that->loader->add_filter( 'the_content', $that->content_filter_service, 'the_content', 9 );
1708
-		}
1709
-
1710
-		// Hook the AJAX wl_timeline action to the Timeline service.
1711
-		$that->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1712
-
1713
-		// Hook the ShareThis service.
1714
-		$that->loader->add_filter( 'the_content', $that->sharethis_service, 'the_content', 99 );
1715
-		$that->loader->add_filter( 'the_excerpt', $that->sharethis_service, 'the_excerpt', 99 );
1716
-
1717
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1718
-		$that->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1719
-
1720
-		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1721
-		// in order to tweak WP's `WP_Query` to include entities in queries related
1722
-		// to categories.
1723
-		$that->loader->add_action( 'pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1724
-
1725
-		/*
1591
+        // $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->analytics_settings_page_action_link, 'action_links', 10, 1 );
1592
+
1593
+        // Hook the AJAX `wl_publisher` action name.
1594
+        $that->loader->add_action( 'wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher' );
1595
+
1596
+        // Hook row actions for the entity type list admin.
1597
+        $that->loader->add_filter( 'wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1598
+
1599
+        /** Ajax actions. */
1600
+        $that->loader->add_action( 'wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export' );
1601
+
1602
+        // Hook capabilities manipulation to allow access to entity type admin
1603
+        // page  on WordPress versions before 4.7.
1604
+        global $wp_version;
1605
+        if ( version_compare( $wp_version, '4.7', '<' ) ) {
1606
+            $that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1607
+        }
1608
+
1609
+        /** Adapters. */
1610
+        $that->loader->add_filter( 'mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1611
+        /**
1612
+         * Disabling Faq temporarily.
1613
+         * Load the tinymce editor button on the tool bar.
1614
+         * @since 3.26.0
1615
+         */
1616
+        //$that->loader->add_filter( 'tiny_mce_before_init', $that->faq_tinymce_adapter, 'register_custom_tags' );
1617
+        //$that->loader->add_filter( 'mce_buttons', $that->faq_tinymce_adapter, 'register_faq_toolbar_button', 10, 1 );
1618
+        //$that->loader->add_filter( 'mce_external_plugins', $that->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1619
+
1620
+
1621
+        $that->loader->add_action( 'wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create' );
1622
+        $that->loader->add_action( 'wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete' );
1623
+
1624
+        /**
1625
+         * @since 3.26.0
1626
+         */
1627
+        $excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1628
+        $that->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1629
+        // Adding Rest route for the post excerpt
1630
+        Post_Excerpt_Rest_Controller::register_routes();
1631
+
1632
+        // Handle the autocomplete request.
1633
+        add_action( 'wp_ajax_wl_autocomplete', array(
1634
+            $that->autocomplete_adapter,
1635
+            'wl_autocomplete',
1636
+        ) );
1637
+        add_action( 'wp_ajax_nopriv_wl_autocomplete', array(
1638
+            $that->autocomplete_adapter,
1639
+            'wl_autocomplete',
1640
+        ) );
1641
+
1642
+        // Hooks to restrict multisite super admin from manipulating entity types.
1643
+        if ( is_multisite() ) {
1644
+            $that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1645
+        }
1646
+
1647
+        $deactivator_feedback = new Wordlift_Deactivator_Feedback();
1648
+
1649
+        add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1650
+        add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1651
+        add_action( 'wp_ajax_wl_deactivation_feedback', array(
1652
+            $deactivator_feedback,
1653
+            'wl_deactivation_feedback'
1654
+        ) );
1655
+
1656
+        /**
1657
+         * Always allow the `wordlift/classification` block.
1658
+         *
1659
+         * @since 3.23.0
1660
+         */
1661
+        add_filter( 'allowed_block_types', function ( $value ) {
1662
+
1663
+            if ( true === $value ) {
1664
+                return $value;
1665
+            }
1666
+
1667
+            return array_merge( (array) $value, array( 'wordlift/classification' ) );
1668
+        }, PHP_INT_MAX );
1669
+
1670
+        /**
1671
+         * @since 3.27.7
1672
+         * @see https://github.com/insideout10/wordlift-plugin/issues/1214
1673
+         */
1674
+        new Top_Entities();
1675
+
1676
+    }
1677
+
1678
+    /**
1679
+     * Register all of the hooks related to the public-facing functionality
1680
+     * of the plugin.
1681
+     *
1682
+     * @since    1.0.0
1683
+     * @access   private
1684
+     */
1685
+    private function define_public_hooks( $that ) {
1686
+
1687
+        $plugin_public = new Wordlift_Public( $that->get_plugin_name(), $that->get_version() );
1688
+
1689
+        // Register the entity post type.
1690
+        $that->loader->add_action( 'init', $that->entity_post_type_service, 'register' );
1691
+
1692
+        // Bind the link generation and handling hooks to the entity link service.
1693
+        $that->loader->add_filter( 'post_type_link', $that->entity_link_service, 'post_type_link', 10, 4 );
1694
+        $that->loader->add_action( 'pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1695
+        // $that->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $that->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 );
1696
+        // $that->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $that->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 );
1697
+
1698
+        $that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1699
+        $that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1700
+        $that->loader->add_action( 'wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts' );
1701
+
1702
+        // Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1703
+        $that->loader->add_filter( 'the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1704
+        // Hook the content filter service to add entity links.
1705
+        if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1706
+            // We run before other filters.
1707
+            $that->loader->add_filter( 'the_content', $that->content_filter_service, 'the_content', 9 );
1708
+        }
1709
+
1710
+        // Hook the AJAX wl_timeline action to the Timeline service.
1711
+        $that->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1712
+
1713
+        // Hook the ShareThis service.
1714
+        $that->loader->add_filter( 'the_content', $that->sharethis_service, 'the_content', 99 );
1715
+        $that->loader->add_filter( 'the_excerpt', $that->sharethis_service, 'the_excerpt', 99 );
1716
+
1717
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1718
+        $that->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1719
+
1720
+        // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1721
+        // in order to tweak WP's `WP_Query` to include entities in queries related
1722
+        // to categories.
1723
+        $that->loader->add_action( 'pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1724
+
1725
+        /*
1726 1726
 		 * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service`
1727 1727
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1728 1728
 		 * order of start time.
1729 1729
 		 */
1730
-		$that->loader->add_action( 'pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1 );
1731
-
1732
-		// This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1733
-		$that->loader->add_action( 'save_post', $that->entity_type_adapter, 'save_post', 9, 3 );
1734
-
1735
-		// Analytics Script Frontend.
1736
-		if ( apply_filters( 'wl_feature__enable__analytics', true ) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable() ) {
1737
-			$that->loader->add_action( 'wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10 );
1738
-		}
1739
-
1740
-	}
1741
-
1742
-	/**
1743
-	 * Run the loader to execute all of the hooks with WordPress.
1744
-	 *
1745
-	 * @since    1.0.0
1746
-	 */
1747
-	public function run() {
1748
-		$this->loader->run();
1749
-	}
1750
-
1751
-	/**
1752
-	 * The name of the plugin used to uniquely identify it within the context of
1753
-	 * WordPress and to define internationalization functionality.
1754
-	 *
1755
-	 * @return    string    The name of the plugin.
1756
-	 * @since     1.0.0
1757
-	 */
1758
-	public function get_plugin_name() {
1759
-		return $this->plugin_name;
1760
-	}
1761
-
1762
-	/**
1763
-	 * The reference to the class that orchestrates the hooks with the plugin.
1764
-	 *
1765
-	 * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1766
-	 * @since     1.0.0
1767
-	 */
1768
-	public function get_loader() {
1769
-		return $this->loader;
1770
-	}
1771
-
1772
-	/**
1773
-	 * Retrieve the version number of the plugin.
1774
-	 *
1775
-	 * @return    string    The version number of the plugin.
1776
-	 * @since     1.0.0
1777
-	 */
1778
-	public function get_version() {
1779
-		return $this->version;
1780
-	}
1781
-
1782
-	/**
1783
-	 * Load dependencies for WP-CLI.
1784
-	 *
1785
-	 * @throws Exception
1786
-	 * @since 3.18.0
1787
-	 */
1788
-	private function load_cli_dependencies() {
1789
-
1790
-	}
1791
-
1792
-	public function add_wl_enabled_blocks() {
1793
-		/**
1794
-		 * Filter: wl_feature__enable__blocks.
1795
-		 *
1796
-		 * @param bool whether the blocks needed to be registered, defaults to true.
1797
-		 *
1798
-		 * @return bool
1799
-		 * @since 3.27.6
1800
-		 */
1801
-
1802
-		wp_register_script( 'wl_enabled_blocks', false );
1803
-
1804
-		$enabled_blocks = array();
1805
-
1806
-		/**
1807
-		 * Filter name: wl_feature__enable__product-navigator
1808
-		 * @since 3.32.3
1809
-		 */
1810
-		if ( apply_filters( 'wl_feature__enable__product-navigator', true ) ) {
1811
-			$enabled_blocks[] = 'wordlift/products-navigator';
1812
-		}
1813
-
1814
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1815
-			// To intimate JS
1816
-			$enabled_blocks = array_merge( $enabled_blocks, array(
1817
-				'wordlift/navigator',
1818
-				'wordlift/chord',
1819
-				'wordlift/geomap',
1820
-				'wordlift/timeline',
1821
-				'wordlift/cloud',
1822
-				'wordlift/vocabulary',
1823
-				'wordlift/faceted-search'
1824
-			) );
1825
-		}
1826
-
1827
-		wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
1828
-		wp_enqueue_script( 'wl_enabled_blocks' );
1829
-	}
1830
-
1831
-	/**
1832
-	 * Register screens based on the filter.
1833
-	 */
1834
-	public function register_screens() {
1835
-		// Hook the menu to the Download Your Data page.
1836
-		if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
1837
-			Assertions::is_set( $this->download_your_data_page, "`download_your_data_page` can't be null" );
1838
-			add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
1839
-		}
1840
-
1841
-		Assertions::is_set( $this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null" );
1842
-		add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
1843
-
1844
-	}
1730
+        $that->loader->add_action( 'pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1 );
1731
+
1732
+        // This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1733
+        $that->loader->add_action( 'save_post', $that->entity_type_adapter, 'save_post', 9, 3 );
1734
+
1735
+        // Analytics Script Frontend.
1736
+        if ( apply_filters( 'wl_feature__enable__analytics', true ) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable() ) {
1737
+            $that->loader->add_action( 'wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10 );
1738
+        }
1739
+
1740
+    }
1741
+
1742
+    /**
1743
+     * Run the loader to execute all of the hooks with WordPress.
1744
+     *
1745
+     * @since    1.0.0
1746
+     */
1747
+    public function run() {
1748
+        $this->loader->run();
1749
+    }
1750
+
1751
+    /**
1752
+     * The name of the plugin used to uniquely identify it within the context of
1753
+     * WordPress and to define internationalization functionality.
1754
+     *
1755
+     * @return    string    The name of the plugin.
1756
+     * @since     1.0.0
1757
+     */
1758
+    public function get_plugin_name() {
1759
+        return $this->plugin_name;
1760
+    }
1761
+
1762
+    /**
1763
+     * The reference to the class that orchestrates the hooks with the plugin.
1764
+     *
1765
+     * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1766
+     * @since     1.0.0
1767
+     */
1768
+    public function get_loader() {
1769
+        return $this->loader;
1770
+    }
1771
+
1772
+    /**
1773
+     * Retrieve the version number of the plugin.
1774
+     *
1775
+     * @return    string    The version number of the plugin.
1776
+     * @since     1.0.0
1777
+     */
1778
+    public function get_version() {
1779
+        return $this->version;
1780
+    }
1781
+
1782
+    /**
1783
+     * Load dependencies for WP-CLI.
1784
+     *
1785
+     * @throws Exception
1786
+     * @since 3.18.0
1787
+     */
1788
+    private function load_cli_dependencies() {
1789
+
1790
+    }
1791
+
1792
+    public function add_wl_enabled_blocks() {
1793
+        /**
1794
+         * Filter: wl_feature__enable__blocks.
1795
+         *
1796
+         * @param bool whether the blocks needed to be registered, defaults to true.
1797
+         *
1798
+         * @return bool
1799
+         * @since 3.27.6
1800
+         */
1801
+
1802
+        wp_register_script( 'wl_enabled_blocks', false );
1803
+
1804
+        $enabled_blocks = array();
1805
+
1806
+        /**
1807
+         * Filter name: wl_feature__enable__product-navigator
1808
+         * @since 3.32.3
1809
+         */
1810
+        if ( apply_filters( 'wl_feature__enable__product-navigator', true ) ) {
1811
+            $enabled_blocks[] = 'wordlift/products-navigator';
1812
+        }
1813
+
1814
+        if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1815
+            // To intimate JS
1816
+            $enabled_blocks = array_merge( $enabled_blocks, array(
1817
+                'wordlift/navigator',
1818
+                'wordlift/chord',
1819
+                'wordlift/geomap',
1820
+                'wordlift/timeline',
1821
+                'wordlift/cloud',
1822
+                'wordlift/vocabulary',
1823
+                'wordlift/faceted-search'
1824
+            ) );
1825
+        }
1826
+
1827
+        wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
1828
+        wp_enqueue_script( 'wl_enabled_blocks' );
1829
+    }
1830
+
1831
+    /**
1832
+     * Register screens based on the filter.
1833
+     */
1834
+    public function register_screens() {
1835
+        // Hook the menu to the Download Your Data page.
1836
+        if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
1837
+            Assertions::is_set( $this->download_your_data_page, "`download_your_data_page` can't be null" );
1838
+            add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
1839
+        }
1840
+
1841
+        Assertions::is_set( $this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null" );
1842
+        add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
1843
+
1844
+    }
1845 1845
 
1846 1846
 }
Please login to merge, or discard this patch.
Spacing   +297 added lines, -297 removed lines patch added patch discarded remove patch
@@ -639,13 +639,13 @@  discard block
 block discarded – undo
639 639
 		$this->set_locale();
640 640
 
641 641
 		$that = $this;
642
-		add_action( 'plugins_loaded', function () use ( $that ) {
643
-			$that->define_admin_hooks( $that );
644
-			$that->define_public_hooks( $that );
645
-		}, 4 );
642
+		add_action('plugins_loaded', function() use ($that) {
643
+			$that->define_admin_hooks($that);
644
+			$that->define_public_hooks($that);
645
+		}, 4);
646 646
 
647 647
 		// If we're in `WP_CLI` load the related files.
648
-		if ( class_exists( 'WP_CLI' ) ) {
648
+		if (class_exists('WP_CLI')) {
649 649
 			$this->load_cli_dependencies();
650 650
 		}
651 651
 
@@ -686,328 +686,328 @@  discard block
 block discarded – undo
686 686
 		 * The class responsible for orchestrating the actions and filters of the
687 687
 		 * core plugin.
688 688
 		 */
689
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
689
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-loader.php';
690 690
 
691 691
 		// The class responsible for plugin uninstall.
692
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-deactivator-feedback.php';
692
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-deactivator-feedback.php';
693 693
 
694 694
 		/**
695 695
 		 * The class responsible for defining internationalization functionality
696 696
 		 * of the plugin.
697 697
 		 */
698
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
698
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-i18n.php';
699 699
 
700 700
 		/**
701 701
 		 * WordLift's supported languages.
702 702
 		 */
703
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
703
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-languages.php';
704 704
 
705 705
 		/**
706 706
 		 * WordLift's supported countries.
707 707
 		 */
708
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-countries.php';
708
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-countries.php';
709 709
 
710 710
 		/**
711 711
 		 * Provide support functions to sanitize data.
712 712
 		 */
713
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
713
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sanitizer.php';
714 714
 
715 715
 		/** Services. */
716
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
717
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-http-api.php';
718
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
719
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
720
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
721
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
722
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
723
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-relation-service.php';
724
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-image-service.php';
716
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-log-service.php';
717
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-http-api.php';
718
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-redirect-service.php';
719
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-configuration-service.php';
720
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-type-service.php';
721
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-service.php';
722
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-link-service.php';
723
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-relation-service.php';
724
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-image-service.php';
725 725
 
726 726
 		/**
727 727
 		 * The Schema service.
728 728
 		 */
729
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
729
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-service.php';
730 730
 
731 731
 		/**
732 732
 		 * The schema:url property service.
733 733
 		 */
734
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
735
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
734
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-service.php';
735
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-url-property-service.php';
736 736
 
737 737
 		/**
738 738
 		 * The UI service.
739 739
 		 */
740
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
740
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-ui-service.php';
741 741
 
742 742
 		/**
743 743
 		 * The Entity Types Taxonomy service.
744 744
 		 */
745
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
745
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-taxonomy-service.php';
746 746
 
747 747
 		/**
748 748
 		 * The Entity service.
749 749
 		 */
750
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-uri-service.php';
751
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
750
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-uri-service.php';
751
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-service.php';
752 752
 
753 753
 		// Add the entity rating service.
754
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
754
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-rating-service.php';
755 755
 
756 756
 		/**
757 757
 		 * The User service.
758 758
 		 */
759
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
759
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-user-service.php';
760 760
 
761 761
 		/**
762 762
 		 * The Timeline service.
763 763
 		 */
764
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
764
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-timeline-service.php';
765 765
 
766 766
 		/**
767 767
 		 * The Topic Taxonomy service.
768 768
 		 */
769
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
769
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-topic-taxonomy-service.php';
770 770
 
771 771
 		/**
772 772
 		 * The WordLift URI service.
773 773
 		 */
774
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
775
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
776
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
774
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-uri-service.php';
775
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-factory.php';
776
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sample-data-service.php';
777 777
 
778
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
779
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
778
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/properties/class-wordlift-property-getter-factory.php';
779
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-attachment-service.php';
780 780
 
781 781
 		/**
782 782
 		 * Load the converters.
783 783
 		 */
784
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
785
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
786
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
787
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
788
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
789
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
784
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/intf-wordlift-post-converter.php';
785
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
786
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-postid-to-jsonld-converter.php';
787
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-to-jsonld-converter.php';
788
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-to-jsonld-converter.php';
789
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-website-converter.php';
790 790
 
791 791
 		/**
792 792
 		 * Load cache-related files.
793 793
 		 */
794
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/cache/require.php';
794
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/cache/require.php';
795 795
 
796 796
 		/**
797 797
 		 * Load the content filter.
798 798
 		 */
799
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
799
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-content-filter-service.php';
800 800
 
801 801
 		/*
802 802
 		 * Load the excerpt helper.
803 803
 		 */
804
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
804
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-excerpt-helper.php';
805 805
 
806 806
 		/**
807 807
 		 * Load the JSON-LD service to publish entities using JSON-LD.s
808 808
 		 *
809 809
 		 * @since 3.8.0
810 810
 		 */
811
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
811
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-service.php';
812 812
 
813 813
 		// The Publisher Service and the AJAX adapter.
814
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
815
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
814
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-service.php';
815
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-ajax-adapter.php';
816 816
 
817
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
817
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-adapter.php';
818 818
 
819 819
 		/**
820 820
 		 * Load the WordLift key validation service.
821 821
 		 */
822
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
822
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-key-validation-service.php';
823 823
 
824 824
 		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
825
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
825
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-category-taxonomy-service.php';
826 826
 
827 827
 		// Load the `Wordlift_Entity_Page_Service` class definition.
828
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-page-service.php';
828
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-page-service.php';
829 829
 
830 830
 		/** Linked Data. */
831
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage.php';
832
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
833
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
834
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
835
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
836
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
837
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
838
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
839
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
841
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
831
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-storage.php';
832
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
833
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-property-storage.php';
834
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
835
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
836
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-author-storage.php';
837
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
838
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-image-storage.php';
839
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-post-related-storage.php';
840
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-url-property-storage.php';
841
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/linked-data/storage/class-wordlift-storage-factory.php';
842 842
 
843 843
 		/** Services. */
844
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-google-analytics-export-service.php';
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-api-service.php';
844
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-google-analytics-export-service.php';
845
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-api-service.php';
846 846
 
847 847
 		/** Adapters. */
848
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
849
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
851
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-adapter.php';
852
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-wprocket-adapter.php';
848
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-tinymce-adapter.php';
849
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-newrelic-adapter.php';
850
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sample-data-ajax-adapter.php';
851
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-adapter.php';
852
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-wprocket-adapter.php';
853 853
 
854 854
 		/** Autocomplete. */
855
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-autocomplete-adapter.php';
855
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-autocomplete-adapter.php';
856 856
 
857
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-remote-image-service.php';
857
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-remote-image-service.php';
858 858
 
859 859
 		/** Analytics */
860
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/analytics/class-wordlift-analytics-connect.php';
860
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/analytics/class-wordlift-analytics-connect.php';
861 861
 
862 862
 		/**
863 863
 		 * The class responsible for defining all actions that occur in the admin area.
864 864
 		 */
865
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
865
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin.php';
866 866
 
867 867
 		/**
868 868
 		 * The class to customize the entity list admin page.
869 869
 		 */
870
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
870
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-list.php';
871 871
 
872 872
 		/**
873 873
 		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
874 874
 		 */
875 875
 		global $wp_version;
876
-		if ( version_compare( $wp_version, '5.3', '<' ) ) {
877
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
876
+		if (version_compare($wp_version, '5.3', '<')) {
877
+			require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-types-taxonomy-walker.php';
878 878
 		} else {
879
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
879
+			require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
880 880
 		}
881 881
 
882 882
 		/**
883 883
 		 * The Notice service.
884 884
 		 */
885
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
885
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-notice-service.php';
886 886
 
887 887
 		/**
888 888
 		 * The PrimaShop adapter.
889 889
 		 */
890
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
890
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-primashop-adapter.php';
891 891
 
892 892
 		/**
893 893
 		 * The WordLift Dashboard service.
894 894
 		 */
895
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
895
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-dashboard.php';
896 896
 
897 897
 		/**
898 898
 		 * The admin 'Install wizard' page.
899 899
 		 */
900
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
900
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-setup.php';
901 901
 
902 902
 		/**
903 903
 		 * The WordLift entity type list admin page controller.
904 904
 		 */
905
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
905
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
906 906
 
907 907
 		/**
908 908
 		 * The WordLift entity type settings admin page controller.
909 909
 		 */
910
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
910
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-type-settings.php';
911 911
 
912 912
 		/**
913 913
 		 * The admin 'Download Your Data' page.
914 914
 		 */
915
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
915
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-download-your-data-page.php';
916 916
 
917 917
 		/**
918 918
 		 * The admin 'WordLift Settings' page.
919 919
 		 */
920
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/intf-wordlift-admin-element.php';
921
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-element.php';
922
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-input-radio-element.php';
923
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select-element.php';
924
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-select2-element.php';
925
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
926
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
927
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
928
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-author-element.php';
929
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
930
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
931
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
932
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
933
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
934
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
920
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/intf-wordlift-admin-element.php';
921
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-input-element.php';
922
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-input-radio-element.php';
923
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-select-element.php';
924
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-select2-element.php';
925
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-language-select-element.php';
926
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-country-select-element.php';
927
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-tabs-element.php';
928
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-author-element.php';
929
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/elements/class-wordlift-admin-publisher-element.php';
930
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-page.php';
931
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page.php';
932
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-analytics-page.php';
933
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page-action-link.php';
934
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
935 935
 
936 936
 		/** Admin Pages */
937
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
938
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-admin-service.php';
937
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-user-profile-page.php';
938
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-type-admin-service.php';
939 939
 
940 940
 		/**
941 941
 		 * The class responsible for defining all actions that occur in the public-facing
942 942
 		 * side of the site.
943 943
 		 */
944
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
944
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-public.php';
945 945
 
946 946
 		/**
947 947
 		 * The shortcode abstract class.
948 948
 		 */
949
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
949
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-shortcode.php';
950 950
 
951 951
 		/**
952 952
 		 * The Timeline shortcode.
953 953
 		 */
954
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
954
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-timeline-shortcode.php';
955 955
 
956 956
 		/**
957 957
 		 * The Navigator shortcode.
958 958
 		 */
959
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
959
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-navigator-shortcode.php';
960 960
 
961 961
 		/**
962 962
 		 * The Products Navigator shortcode.
963 963
 		 */
964
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-products-navigator-shortcode.php';
964
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-products-navigator-shortcode.php';
965 965
 
966 966
 		/**
967 967
 		 * The chord shortcode.
968 968
 		 */
969
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
969
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-chord-shortcode.php';
970 970
 
971 971
 		/**
972 972
 		 * The geomap shortcode.
973 973
 		 */
974
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
974
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-geomap-shortcode.php';
975 975
 
976 976
 		/**
977 977
 		 * The entity cloud shortcode.
978 978
 		 */
979
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
979
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-shortcode.php';
980 980
 
981 981
 		/**
982 982
 		 * The entity glossary shortcode.
983 983
 		 */
984
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-alphabet-service.php';
985
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-vocabulary-shortcode.php';
984
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-alphabet-service.php';
985
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-vocabulary-shortcode.php';
986 986
 
987 987
 		/**
988 988
 		 * Faceted Search shortcode.
989 989
 		 */
990
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-faceted-search-shortcode.php';
990
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-faceted-search-shortcode.php';
991 991
 
992 992
 		/**
993 993
 		 * The ShareThis service.
994 994
 		 */
995
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
995
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-sharethis-service.php';
996 996
 
997 997
 		/**
998 998
 		 * The SEO service.
999 999
 		 */
1000
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
1000
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-seo-service.php';
1001 1001
 
1002 1002
 		/**
1003 1003
 		 * The AMP service.
1004 1004
 		 */
1005
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
1005
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-amp-service.php';
1006 1006
 
1007 1007
 		/** Widgets */
1008
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
1009
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1010
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-context-cards.php';
1008
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-widget.php';
1009
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-widget.php';
1010
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-context-cards.php';
1011 1011
 
1012 1012
 		/*
1013 1013
 		 * Batch Operations. They're similar to Batch Actions but do not require working on post types.
@@ -1016,18 +1016,18 @@  discard block
 block discarded – undo
1016 1016
 		 *
1017 1017
 		 * @since 3.20.0
1018 1018
 		 */
1019
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/intf-wordlift-batch-operation.php';
1020
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1019
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/batch/intf-wordlift-batch-operation.php';
1020
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1021 1021
 
1022 1022
 		/*
1023 1023
 		 * Schema.org Services.
1024 1024
 		 *
1025 1025
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1026 1026
 		 */
1027
-		if ( apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1028
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1029
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1030
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1027
+		if (apply_filters('wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES)) {
1028
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1029
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1030
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1031 1031
 			new Wordlift_Schemaorg_Sync_Service();
1032 1032
 			$schemaorg_property_service = Wordlift_Schemaorg_Property_Service::get_instance();
1033 1033
 			new Wordlift_Schemaorg_Class_Service();
@@ -1043,13 +1043,13 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
 		// Instantiate a global logger.
1045 1045
 		global $wl_logger;
1046
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1046
+		$wl_logger = Wordlift_Log_Service::get_logger('WordLift');
1047 1047
 
1048 1048
 		// Load the `wl-api` end-point.
1049 1049
 		new Wordlift_Http_Api();
1050 1050
 
1051 1051
 		// Load the Install Service.
1052
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'install/class-wordlift-install-service.php';
1052
+		require_once plugin_dir_path(dirname(__FILE__)).'install/class-wordlift-install-service.php';
1053 1053
 		$this->install_service = new Wordlift_Install_Service();
1054 1054
 		$this->notice_service  = new Wordlift_Notice_Service();
1055 1055
 		$this->user_service    = Wordlift_User_Service::get_instance();
@@ -1067,21 +1067,21 @@  discard block
 block discarded – undo
1067 1067
 
1068 1068
 
1069 1069
 		$that = $this;
1070
-		add_action( 'plugins_loaded', function () use ( &$that, $schemaorg_property_service ) {
1070
+		add_action('plugins_loaded', function() use (&$that, $schemaorg_property_service) {
1071 1071
 
1072 1072
 			/** Services. */
1073 1073
 			// Create the configuration service.
1074 1074
 			$api_service = new Wordlift_Api_Service();
1075 1075
 
1076 1076
 			// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1077
-			$that->entity_link_service = new Wordlift_Entity_Link_Service( $that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() );
1077
+			$that->entity_link_service = new Wordlift_Entity_Link_Service($that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path());
1078 1078
 
1079 1079
 			$schema_url_property_service = new Wordlift_Schema_Url_Property_Service();
1080 1080
 
1081 1081
 			$that->entity_uri_service = Wordlift_Entity_Uri_Service::get_instance();
1082 1082
 
1083 1083
 			// Create a new instance of the Redirect service.
1084
-			$that->redirect_service = new Wordlift_Redirect_Service( $that->entity_uri_service );
1084
+			$that->redirect_service = new Wordlift_Redirect_Service($that->entity_uri_service);
1085 1085
 
1086 1086
 			// Create a new instance of the Timeline service and Timeline shortcode.
1087 1087
 			$that->timeline_service = new Wordlift_Timeline_Service();
@@ -1094,30 +1094,30 @@  discard block
 block discarded – undo
1094 1094
 			// Create an instance of the PrimaShop adapter.
1095 1095
 			$that->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1096 1096
 
1097
-			$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1097
+			$uri_service = new Wordlift_Uri_Service($GLOBALS['wpdb']);
1098 1098
 
1099 1099
 			// Create the entity rating service.
1100 1100
 			$that->rating_service = Wordlift_Rating_Service::get_instance();
1101 1101
 
1102 1102
 			// Create entity list customization (wp-admin/edit.php).
1103
-			$that->entity_list_service = new Wordlift_Entity_List_Service( $that->rating_service );
1103
+			$that->entity_list_service = new Wordlift_Entity_List_Service($that->rating_service);
1104 1104
 
1105 1105
 			// Create an instance of the Publisher Service and the AJAX Adapter.
1106 1106
 			$that->publisher_service = Wordlift_Publisher_Service::get_instance();
1107
-			$that->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1108
-			$that->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1107
+			$that->property_factory  = new Wordlift_Property_Factory($schema_url_property_service);
1108
+			$that->property_factory->register(Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service);
1109 1109
 
1110 1110
 			$attachment_service = Wordlift_Attachment_Service::get_instance();
1111 1111
 
1112 1112
 			// Instantiate the JSON-LD service.
1113 1113
 			$property_getter                       = Wordlift_Property_Getter_Factory::create();
1114
-			$that->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1115
-			$that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter );
1116
-			$that->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter );
1117
-			$that->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1114
+			$that->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service);
1115
+			$that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter);
1116
+			$that->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter($that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter);
1117
+			$that->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service);
1118 1118
 
1119
-			$jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1120
-			$that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $that->postid_to_jsonld_converter, $jsonld_cache );
1119
+			$jsonld_cache                            = new Ttl_Cache('jsonld', 86400);
1120
+			$that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter($that->postid_to_jsonld_converter, $jsonld_cache);
1121 1121
 			/*
1122 1122
 			 * Load the `Wordlift_Term_JsonLd_Adapter`.
1123 1123
 			 *
@@ -1125,21 +1125,21 @@  discard block
 block discarded – undo
1125 1125
 			 *
1126 1126
 			 * @since 3.20.0
1127 1127
 			 */
1128
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-term-jsonld-adapter.php';
1128
+			require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-term-jsonld-adapter.php';
1129 1129
 
1130
-			$term_jsonld_adapter  = new Wordlift_Term_JsonLd_Adapter( $that->entity_uri_service, $that->cached_postid_to_jsonld_converter );
1131
-			$that->jsonld_service = new Wordlift_Jsonld_Service( Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter );
1130
+			$term_jsonld_adapter  = new Wordlift_Term_JsonLd_Adapter($that->entity_uri_service, $that->cached_postid_to_jsonld_converter);
1131
+			$that->jsonld_service = new Wordlift_Jsonld_Service(Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter);
1132 1132
 
1133 1133
 			$jsonld_service = new Jsonld_Service(
1134 1134
 				$that->jsonld_service,
1135 1135
 				$term_jsonld_adapter,
1136
-				new Jsonld_User_Service( $that->user_service ) );
1137
-			new Jsonld_Endpoint( $jsonld_service, $that->entity_uri_service );
1136
+				new Jsonld_User_Service($that->user_service) );
1137
+			new Jsonld_Endpoint($jsonld_service, $that->entity_uri_service);
1138 1138
 
1139 1139
 			// Prints the JSON-LD in the head.
1140
-			new Jsonld_Adapter( $that->jsonld_service );
1140
+			new Jsonld_Adapter($that->jsonld_service);
1141 1141
 
1142
-			new Jsonld_By_Id_Endpoint( $that->jsonld_service, $that->entity_uri_service );
1142
+			new Jsonld_By_Id_Endpoint($that->jsonld_service, $that->entity_uri_service);
1143 1143
 
1144 1144
 			/**
1145 1145
 			 * @since 3.37.1
@@ -1152,10 +1152,10 @@  discard block
 block discarded – undo
1152 1152
 			// Creating Faq Content filter service.
1153 1153
 			$that->faq_content_filter_service = new Faq_Content_Filter();
1154 1154
 			$that->sample_data_service        = Wordlift_Sample_Data_Service::get_instance();
1155
-			$that->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $that->sample_data_service );
1155
+			$that->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter($that->sample_data_service);
1156 1156
 
1157
-			$that->loader->add_action( 'enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks' );
1158
-			$that->loader->add_action( 'admin_enqueue_scripts', $that, 'add_wl_enabled_blocks' );
1157
+			$that->loader->add_action('enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks');
1158
+			$that->loader->add_action('admin_enqueue_scripts', $that, 'add_wl_enabled_blocks');
1159 1159
 
1160 1160
 			/**
1161 1161
 			 * Filter: wl_feature__enable__blocks.
@@ -1165,15 +1165,15 @@  discard block
 block discarded – undo
1165 1165
 			 * @return bool
1166 1166
 			 * @since 3.27.6
1167 1167
 			 */
1168
-			if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1168
+			if (apply_filters('wl_feature__enable__blocks', true)) {
1169 1169
 				// Initialize the short-codes.
1170
-				new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1170
+				new Async_Template_Decorator(new Wordlift_Navigator_Shortcode());
1171 1171
 				new Wordlift_Chord_Shortcode();
1172 1172
 				new Wordlift_Geomap_Shortcode();
1173 1173
 				new Wordlift_Timeline_Shortcode();
1174
-				new Wordlift_Related_Entities_Cloud_Shortcode( Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance() );
1174
+				new Wordlift_Related_Entities_Cloud_Shortcode(Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance());
1175 1175
 				new Wordlift_Vocabulary_Shortcode();
1176
-				new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1176
+				new Async_Template_Decorator(new Wordlift_Faceted_Search_Shortcode());
1177 1177
 			}
1178 1178
 
1179 1179
 			new Wordlift_Products_Navigator_Shortcode();
@@ -1186,16 +1186,16 @@  discard block
 block discarded – undo
1186 1186
 			new Wordlift_Seo_Service();
1187 1187
 
1188 1188
 			// Initialize the AMP service.
1189
-			new Wordlift_AMP_Service( $that->jsonld_service );
1189
+			new Wordlift_AMP_Service($that->jsonld_service);
1190 1190
 
1191 1191
 			/** Services. */
1192 1192
 			$that->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1193 1193
 			new Wordlift_Image_Service();
1194 1194
 
1195 1195
 			/** Adapters. */
1196
-			$that->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( Wordlift_Entity_Type_Service::get_instance() );
1197
-			$that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $that->publisher_service );
1198
-			$that->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $that );
1196
+			$that->entity_type_adapter    = new Wordlift_Entity_Type_Adapter(Wordlift_Entity_Type_Service::get_instance());
1197
+			$that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter($that->publisher_service);
1198
+			$that->tinymce_adapter        = new Wordlift_Tinymce_Adapter($that);
1199 1199
 
1200 1200
 			/*
1201 1201
 			 * Exclude our public js from WP-Rocket.
@@ -1215,14 +1215,14 @@  discard block
 block discarded – undo
1215 1215
 			$that->language_select_element = new Wordlift_Admin_Language_Select_Element();
1216 1216
 			$that->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1217 1217
 			$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1218
-			$that->publisher_element       = new Wordlift_Admin_Publisher_Element( $that->publisher_service, $tabs_element, $that->select2_element );
1219
-			$that->author_element          = new Wordlift_Admin_Author_Element( $that->publisher_service, $that->select2_element );
1218
+			$that->publisher_element       = new Wordlift_Admin_Publisher_Element($that->publisher_service, $tabs_element, $that->select2_element);
1219
+			$that->author_element          = new Wordlift_Admin_Author_Element($that->publisher_service, $that->select2_element);
1220 1220
 
1221 1221
 			$that->settings_page             = Wordlift_Admin_Settings_Page::get_instance();
1222
-			$that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $that->settings_page );
1222
+			$that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link($that->settings_page);
1223 1223
 
1224
-			$that->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $that->input_element, $that->radio_input_element );
1225
-			$that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $that->analytics_settings_page );
1224
+			$that->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page($that->input_element, $that->radio_input_element);
1225
+			$that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link($that->analytics_settings_page);
1226 1226
 			$that->analytics_connect                   = new Wordlift_Analytics_Connect();
1227 1227
 
1228 1228
 			// Pages.
@@ -1233,9 +1233,9 @@  discard block
 block discarded – undo
1233 1233
 			 *
1234 1234
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/914
1235 1235
 			 */
1236
-			if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1237
-				require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
1238
-				new Wordlift_Admin_Post_Edit_Page( $that );
1236
+			if (apply_filters('wl_can_see_classification_box', true)) {
1237
+				require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-post-edit-page.php';
1238
+				new Wordlift_Admin_Post_Edit_Page($that);
1239 1239
 			}
1240 1240
 			new Wordlift_Entity_Type_Admin_Service();
1241 1241
 
@@ -1243,19 +1243,19 @@  discard block
 block discarded – undo
1243 1243
 			$that->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1244 1244
 
1245 1245
 			// Create an instance of the install wizard.
1246
-			$that->admin_setup = new Wordlift_Admin_Setup( $that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element );
1246
+			$that->admin_setup = new Wordlift_Admin_Setup($that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element);
1247 1247
 
1248
-			$that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $that->entity_post_type_service );
1248
+			$that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service($that->entity_post_type_service);
1249 1249
 
1250 1250
 			// User Profile.
1251
-			new Wordlift_Admin_User_Profile_Page( $that->author_element, $that->user_service );
1251
+			new Wordlift_Admin_User_Profile_Page($that->author_element, $that->user_service);
1252 1252
 
1253 1253
 			$that->entity_page_service = new Wordlift_Entity_Page_Service();
1254 1254
 
1255 1255
 			// Load the debug service if WP is in debug mode.
1256
-			if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1257
-				require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1258
-				new Wordlift_Debug_Service( Wordlift_Entity_Service::get_instance(), $uri_service );
1256
+			if (defined('WP_DEBUG') && WP_DEBUG) {
1257
+				require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-debug-service.php';
1258
+				new Wordlift_Debug_Service(Wordlift_Entity_Service::get_instance(), $uri_service);
1259 1259
 			}
1260 1260
 
1261 1261
 			// Remote Image Service.
@@ -1268,12 +1268,12 @@  discard block
 block discarded – undo
1268 1268
 			 *
1269 1269
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/852.
1270 1270
 			 */
1271
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-action.php';
1272
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-service.php';
1273
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1271
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-batch-action.php';
1272
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/mapping/class-wordlift-mapping-service.php';
1273
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1274 1274
 
1275 1275
 			// Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1276
-			new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1276
+			new Wordlift_Mapping_Ajax_Adapter(new Wordlift_Mapping_Service(Wordlift_Entity_Type_Service::get_instance()));
1277 1277
 
1278 1278
 			/*
1279 1279
 			 * Load the Mappings JSON-LD post processing.
@@ -1287,11 +1287,11 @@  discard block
 block discarded – undo
1287 1287
 			// Taxonomy term rule validator for validating rules for term pages.
1288 1288
 			new Taxonomy_Term_Rule_Validator();
1289 1289
 			new Post_Taxonomy_Term_Rule_Validator();
1290
-			$rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1291
-			$rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1292
-			$mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1290
+			$rule_validators_registry = new Rule_Validators_Registry($default_rule_validator);
1291
+			$rule_groups_validator    = new Rule_Groups_Validator($rule_validators_registry);
1292
+			$mappings_validator       = new Mappings_Validator($mappings_dbo, $rule_groups_validator);
1293 1293
 
1294
-			new Url_To_Entity_Transform_Function( $that->entity_uri_service );
1294
+			new Url_To_Entity_Transform_Function($that->entity_uri_service);
1295 1295
 			new Taxonomy_To_Terms_Transform_Function();
1296 1296
 			new Post_Id_To_Entity_Transform_Function();
1297 1297
 			$mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
@@ -1301,7 +1301,7 @@  discard block
 block discarded – undo
1301 1301
 			 * Intiailize the acf group data formatter.
1302 1302
 			 */
1303 1303
 			new Acf_Group_Formatter();
1304
-			new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1304
+			new Jsonld_Converter($mappings_validator, $mappings_transform_functions_registry);
1305 1305
 
1306 1306
 			/**
1307 1307
 			 * @since 3.26.0
@@ -1319,14 +1319,14 @@  discard block
 block discarded – undo
1319 1319
 			// Call this static method to register FAQ routes to rest api - disabled
1320 1320
 			//Faq_Rest_Controller::register_routes();
1321 1321
 
1322
-			$that->storage_factory = new Wordlift_Storage_Factory( Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter );
1322
+			$that->storage_factory = new Wordlift_Storage_Factory(Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter);
1323 1323
 
1324 1324
 			/** WL Autocomplete. */
1325
-			$autocomplete_service       = new All_Autocomplete_Service( array(
1325
+			$autocomplete_service = new All_Autocomplete_Service(array(
1326 1326
 				new Local_Autocomplete_Service(),
1327
-				new Linked_Data_Autocomplete_Service( Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance() ),
1328
-			) );
1329
-			$that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1327
+				new Linked_Data_Autocomplete_Service(Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance()),
1328
+			));
1329
+			$that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter($autocomplete_service);
1330 1330
 
1331 1331
 			/**
1332 1332
 			 * @since 3.27.2
@@ -1335,10 +1335,10 @@  discard block
 block discarded – undo
1335 1335
 			 */
1336 1336
 			new Recipe_Maker_Post_Type_Hook();
1337 1337
 			$recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1338
-			new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1339
-			new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1340
-			new Recipe_Maker_Jsonld_Swap( $recipe_maker_validation_service, $that->jsonld_service );
1341
-			new Recipe_Maker_Warning( $recipe_maker_validation_service );
1338
+			new Recipe_Maker_Jsonld_Hook($attachment_service, $recipe_maker_validation_service);
1339
+			new Recipe_Maker_After_Get_Jsonld_Hook($recipe_maker_validation_service);
1340
+			new Recipe_Maker_Jsonld_Swap($recipe_maker_validation_service, $that->jsonld_service);
1341
+			new Recipe_Maker_Warning($recipe_maker_validation_service);
1342 1342
 
1343 1343
 
1344 1344
 			new Duplicate_Markup_Remover();
@@ -1347,7 +1347,7 @@  discard block
 block discarded – undo
1347 1347
 			 * @since 3.27.8
1348 1348
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1349 1349
 			 */
1350
-			new Key_Validation_Notice( $that->key_validation_service, Wordlift_Configuration_Service::get_instance() );
1350
+			new Key_Validation_Notice($that->key_validation_service, Wordlift_Configuration_Service::get_instance());
1351 1351
 			/**
1352 1352
 			 * @since 3.28.0
1353 1353
 			 * @see https://github.com/insideout10/wordlift-plugin/issues?q=assignee%3Anaveen17797+is%3Aopen
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
 			 * @since 3.29.0
1359 1359
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1360 1360
 			 */
1361
-			new Entity_Rest_Service( Wordlift_Entity_Type_Service::get_instance() );
1361
+			new Entity_Rest_Service(Wordlift_Entity_Type_Service::get_instance());
1362 1362
 
1363 1363
 			/**
1364 1364
 			 * Expand author in to references.
@@ -1367,12 +1367,12 @@  discard block
 block discarded – undo
1367 1367
 			 */
1368 1368
 
1369 1369
 
1370
-			if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1371
-				new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1370
+			if (apply_filters('wl_feature__enable__article-wrapper', false)) {
1371
+				new Jsonld_Article_Wrapper(Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter);
1372 1372
 			}
1373 1373
 
1374 1374
 
1375
-			if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1375
+			if (apply_filters('wl_feature__enable__match-terms', false)) {
1376 1376
 				$vocabulary_loader = new Vocabulary_Loader();
1377 1377
 				$vocabulary_loader->init_vocabulary();
1378 1378
 			}
@@ -1380,7 +1380,7 @@  discard block
 block discarded – undo
1380 1380
 			/**
1381 1381
 			 *Added for feature request 1496 (Webhooks)
1382 1382
 			 */
1383
-			if ( apply_filters( 'wl_feature__enable__webhooks', false ) ) {
1383
+			if (apply_filters('wl_feature__enable__webhooks', false)) {
1384 1384
 				$that->webhook_loader = new Webhooks_Loader();
1385 1385
 				$that->webhook_loader->init();
1386 1386
 			}
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
 			 * @since 3.31.5
1410 1410
 			 * Create configuration endpoint for webapp to configure.
1411 1411
 			 */
1412
-			new Config( $that->admin_setup, $that->key_validation_service );
1412
+			new Config($that->admin_setup, $that->key_validation_service);
1413 1413
 			/**
1414 1414
 			 * @since 3.31.7
1415 1415
 			 * Remove duplicate videoobject.
@@ -1421,7 +1421,7 @@  discard block
 block discarded – undo
1421 1421
 			 * @since 3.32.0
1422 1422
 			 * Create loader for vocabulary terms.
1423 1423
 			 */
1424
-			$vocabulary_terms_loader = new Vocabulary_Terms_Loader( Wordlift_Entity_Type_Service::get_instance(), $property_getter );
1424
+			$vocabulary_terms_loader = new Vocabulary_Terms_Loader(Wordlift_Entity_Type_Service::get_instance(), $property_getter);
1425 1425
 			$vocabulary_terms_loader->init_feature();
1426 1426
 
1427 1427
 			new Entity_Type_Change_Handler(
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
 				Wordlift_Entity_Type_Service::get_instance()
1430 1430
 			);
1431 1431
 
1432
-		}, 3 );
1432
+		}, 3);
1433 1433
 
1434 1434
 
1435 1435
 		new Entity_Type_Setter();
@@ -1449,9 +1449,9 @@  discard block
 block discarded – undo
1449 1449
 	private function set_locale() {
1450 1450
 
1451 1451
 		$plugin_i18n = new Wordlift_i18n();
1452
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1452
+		$plugin_i18n->set_domain($this->get_plugin_name());
1453 1453
 
1454
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1454
+		$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
1455 1455
 
1456 1456
 	}
1457 1457
 
@@ -1462,7 +1462,7 @@  discard block
 block discarded – undo
1462 1462
 	 * @since    1.0.0
1463 1463
 	 * @access   private
1464 1464
 	 */
1465
-	private function define_admin_hooks( $that ) {
1465
+	private function define_admin_hooks($that) {
1466 1466
 		$plugin_admin = new
1467 1467
 		Wordlift_Admin(
1468 1468
 			$that->get_plugin_name(),
@@ -1471,64 +1471,64 @@  discard block
 block discarded – undo
1471 1471
 			$that->user_service
1472 1472
 		);
1473 1473
 
1474
-		$that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1475
-		$that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1474
+		$that->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
1475
+		$that->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11);
1476 1476
 
1477 1477
 		// Hook the `admin_init` function to the Admin Setup.
1478
-		Assertions::is_set( $that->admin_setup, '`admin_setup` must be set' );
1479
-		$that->loader->add_action( 'admin_init', $that->admin_setup, 'admin_init' );
1478
+		Assertions::is_set($that->admin_setup, '`admin_setup` must be set');
1479
+		$that->loader->add_action('admin_init', $that->admin_setup, 'admin_init');
1480 1480
 
1481 1481
 		// Hook the admin_init to the settings page.
1482
-		Assertions::is_set( $that->settings_page, '`setting_page` must be set' );
1483
-		$that->loader->add_action( 'admin_init', $that->settings_page, 'admin_init' );
1482
+		Assertions::is_set($that->settings_page, '`setting_page` must be set');
1483
+		$that->loader->add_action('admin_init', $that->settings_page, 'admin_init');
1484 1484
 
1485 1485
 		// Hook the admin_init to the analytics settings page.
1486
-		Assertions::is_set( $that->analytics_settings_page, '`analytics_setting_page` must be set' );
1487
-		$that->loader->add_action( 'admin_init', $that->analytics_settings_page, 'admin_init' );
1486
+		Assertions::is_set($that->analytics_settings_page, '`analytics_setting_page` must be set');
1487
+		$that->loader->add_action('admin_init', $that->analytics_settings_page, 'admin_init');
1488 1488
 
1489 1489
 		// Hook the init action to taxonomy services.
1490
-		$that->loader->add_action( 'init', $that->topic_taxonomy_service, 'init', 0 );
1491
-		$that->loader->add_action( 'init', $that->entity_types_taxonomy_service, 'init', 0 );
1490
+		$that->loader->add_action('init', $that->topic_taxonomy_service, 'init', 0);
1491
+		$that->loader->add_action('init', $that->entity_types_taxonomy_service, 'init', 0);
1492 1492
 
1493 1493
 		// Hook the AJAX wl_timeline action to the Timeline service.
1494
-		$that->loader->add_action( 'wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1494
+		$that->loader->add_action('wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline');
1495 1495
 
1496 1496
 		// Register custom allowed redirect hosts.
1497
-		$that->loader->add_filter( 'allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts' );
1497
+		$that->loader->add_filter('allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts');
1498 1498
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1499
-		$that->loader->add_action( 'wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect' );
1499
+		$that->loader->add_action('wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect');
1500 1500
 
1501 1501
 		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1502 1502
 		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1503
-		$that->loader->add_action( 'save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 3 );
1504
-		$that->loader->add_action( 'save_post', $that->rating_service, 'set_rating_for', 20, 1 );
1503
+		$that->loader->add_action('save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 3);
1504
+		$that->loader->add_action('save_post', $that->rating_service, 'set_rating_for', 20, 1);
1505 1505
 
1506
-		$that->loader->add_action( 'edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1 );
1507
-		$that->loader->add_action( 'in_admin_header', $that->rating_service, 'in_admin_header' );
1506
+		$that->loader->add_action('edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1);
1507
+		$that->loader->add_action('in_admin_header', $that->rating_service, 'in_admin_header');
1508 1508
 
1509 1509
 		// Entity listing customization (wp-admin/edit.php)
1510 1510
 		// Add custom columns.
1511
-		$that->loader->add_filter( 'manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns' );
1511
+		$that->loader->add_filter('manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns');
1512 1512
 		// no explicit entity as it prevents handling of other post types.
1513
-		$that->loader->add_filter( 'manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2 );
1513
+		$that->loader->add_filter('manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2);
1514 1514
 		// Add 4W selection.
1515
-		$that->loader->add_action( 'restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope' );
1516
-		$that->loader->add_filter( 'posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope' );
1517
-		$that->loader->add_action( 'pre_get_posts', $that->entity_list_service, 'pre_get_posts' );
1518
-		$that->loader->add_action( 'load-edit.php', $that->entity_list_service, 'load_edit' );
1515
+		$that->loader->add_action('restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope');
1516
+		$that->loader->add_filter('posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope');
1517
+		$that->loader->add_action('pre_get_posts', $that->entity_list_service, 'pre_get_posts');
1518
+		$that->loader->add_action('load-edit.php', $that->entity_list_service, 'load_edit');
1519 1519
 
1520 1520
 		/*
1521 1521
 		 * If `All Entity Types` is disable, use the radio button Walker.
1522 1522
 		 *
1523 1523
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1524 1524
 		 */
1525
-		if ( ! apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1526
-			$that->loader->add_filter( 'wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args' );
1525
+		if ( ! apply_filters('wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES)) {
1526
+			$that->loader->add_filter('wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args');
1527 1527
 		}
1528 1528
 
1529 1529
 		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1530 1530
 		// entities.
1531
-		$that->loader->add_filter( 'prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1531
+		$that->loader->add_filter('prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2);
1532 1532
 
1533 1533
 		/**
1534 1534
 		 * Filter: wl_feature__enable__settings-download.
@@ -1538,27 +1538,27 @@  discard block
 block discarded – undo
1538 1538
 		 * @return bool
1539 1539
 		 * @since 3.27.6
1540 1540
 		 */
1541
-		$that->features_registry->register_feature_from_slug( 'settings-download', true, array(
1541
+		$that->features_registry->register_feature_from_slug('settings-download', true, array(
1542 1542
 			$that,
1543 1543
 			'register_screens'
1544
-		) );
1544
+		));
1545 1545
 
1546 1546
 
1547 1547
 		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1548
-		$that->loader->add_action( 'wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10 );
1548
+		$that->loader->add_action('wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10);
1549 1549
 
1550 1550
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1551
-		$that->loader->add_action( 'wp_ajax_wl_jsonld', $that->jsonld_service, 'get' );
1552
-		$that->loader->add_action( 'admin_post_wl_jsonld', $that->jsonld_service, 'get' );
1553
-		$that->loader->add_action( 'admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1551
+		$that->loader->add_action('wp_ajax_wl_jsonld', $that->jsonld_service, 'get');
1552
+		$that->loader->add_action('admin_post_wl_jsonld', $that->jsonld_service, 'get');
1553
+		$that->loader->add_action('admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get');
1554 1554
 
1555 1555
 		// Hook the AJAX wl_validate_key action to the Key Validation service.
1556
-		$that->loader->add_action( 'wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key' );
1556
+		$that->loader->add_action('wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key');
1557 1557
 
1558 1558
 		// Hook the AJAX wl_update_country_options action to the countries.
1559
-		$that->loader->add_action( 'wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html' );
1559
+		$that->loader->add_action('wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html');
1560 1560
 
1561
-		$that->loader->add_filter( 'admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction' );
1561
+		$that->loader->add_filter('admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction');
1562 1562
 
1563 1563
 		// Hook the menu creation on the general wordlift menu creation.
1564 1564
 		/**
@@ -1571,16 +1571,16 @@  discard block
 block discarded – undo
1571 1571
 		 *
1572 1572
 		 * Since 3.30.0 this feature is registered using registry.
1573 1573
 		 */
1574
-		if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1575
-			add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1574
+		if (apply_filters('wl_feature__enable__settings-screen', true) || Admin_User_Option::is_wordlift_admin()) {
1575
+			add_action('wl_admin_menu', array($that->settings_page, 'admin_menu'), 10, 2);
1576 1576
 		}
1577 1577
 
1578 1578
 		// Hook key update.
1579
-		$that->loader->add_action( 'pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2 );
1580
-		$that->loader->add_action( 'update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2 );
1579
+		$that->loader->add_action('pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2);
1580
+		$that->loader->add_action('update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2);
1581 1581
 
1582 1582
 		// Add additional action links to the WordLift plugin in the plugins page.
1583
-		$that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1 );
1583
+		$that->loader->add_filter('plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1);
1584 1584
 
1585 1585
 		/*
1586 1586
 		 * Remove the Analytics Settings link from the plugin page.
@@ -1591,23 +1591,23 @@  discard block
 block discarded – undo
1591 1591
 		// $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->analytics_settings_page_action_link, 'action_links', 10, 1 );
1592 1592
 
1593 1593
 		// Hook the AJAX `wl_publisher` action name.
1594
-		$that->loader->add_action( 'wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher' );
1594
+		$that->loader->add_action('wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher');
1595 1595
 
1596 1596
 		// Hook row actions for the entity type list admin.
1597
-		$that->loader->add_filter( 'wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1597
+		$that->loader->add_filter('wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2);
1598 1598
 
1599 1599
 		/** Ajax actions. */
1600
-		$that->loader->add_action( 'wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export' );
1600
+		$that->loader->add_action('wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export');
1601 1601
 
1602 1602
 		// Hook capabilities manipulation to allow access to entity type admin
1603 1603
 		// page  on WordPress versions before 4.7.
1604 1604
 		global $wp_version;
1605
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1606
-			$that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1605
+		if (version_compare($wp_version, '4.7', '<')) {
1606
+			$that->loader->add_filter('map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4);
1607 1607
 		}
1608 1608
 
1609 1609
 		/** Adapters. */
1610
-		$that->loader->add_filter( 'mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1610
+		$that->loader->add_filter('mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1);
1611 1611
 		/**
1612 1612
 		 * Disabling Faq temporarily.
1613 1613
 		 * Load the tinymce editor button on the tool bar.
@@ -1618,54 +1618,54 @@  discard block
 block discarded – undo
1618 1618
 		//$that->loader->add_filter( 'mce_external_plugins', $that->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1619 1619
 
1620 1620
 
1621
-		$that->loader->add_action( 'wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create' );
1622
-		$that->loader->add_action( 'wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete' );
1621
+		$that->loader->add_action('wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create');
1622
+		$that->loader->add_action('wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete');
1623 1623
 
1624 1624
 		/**
1625 1625
 		 * @since 3.26.0
1626 1626
 		 */
1627 1627
 		$excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1628
-		$that->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1628
+		$that->loader->add_action('do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box');
1629 1629
 		// Adding Rest route for the post excerpt
1630 1630
 		Post_Excerpt_Rest_Controller::register_routes();
1631 1631
 
1632 1632
 		// Handle the autocomplete request.
1633
-		add_action( 'wp_ajax_wl_autocomplete', array(
1633
+		add_action('wp_ajax_wl_autocomplete', array(
1634 1634
 			$that->autocomplete_adapter,
1635 1635
 			'wl_autocomplete',
1636
-		) );
1637
-		add_action( 'wp_ajax_nopriv_wl_autocomplete', array(
1636
+		));
1637
+		add_action('wp_ajax_nopriv_wl_autocomplete', array(
1638 1638
 			$that->autocomplete_adapter,
1639 1639
 			'wl_autocomplete',
1640
-		) );
1640
+		));
1641 1641
 
1642 1642
 		// Hooks to restrict multisite super admin from manipulating entity types.
1643
-		if ( is_multisite() ) {
1644
-			$that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1643
+		if (is_multisite()) {
1644
+			$that->loader->add_filter('map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 4);
1645 1645
 		}
1646 1646
 
1647 1647
 		$deactivator_feedback = new Wordlift_Deactivator_Feedback();
1648 1648
 
1649
-		add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1650
-		add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1651
-		add_action( 'wp_ajax_wl_deactivation_feedback', array(
1649
+		add_action('admin_footer', array($deactivator_feedback, 'render_feedback_popup'));
1650
+		add_action('admin_enqueue_scripts', array($deactivator_feedback, 'enqueue_popup_scripts'));
1651
+		add_action('wp_ajax_wl_deactivation_feedback', array(
1652 1652
 			$deactivator_feedback,
1653 1653
 			'wl_deactivation_feedback'
1654
-		) );
1654
+		));
1655 1655
 
1656 1656
 		/**
1657 1657
 		 * Always allow the `wordlift/classification` block.
1658 1658
 		 *
1659 1659
 		 * @since 3.23.0
1660 1660
 		 */
1661
-		add_filter( 'allowed_block_types', function ( $value ) {
1661
+		add_filter('allowed_block_types', function($value) {
1662 1662
 
1663
-			if ( true === $value ) {
1663
+			if (true === $value) {
1664 1664
 				return $value;
1665 1665
 			}
1666 1666
 
1667
-			return array_merge( (array) $value, array( 'wordlift/classification' ) );
1668
-		}, PHP_INT_MAX );
1667
+			return array_merge((array) $value, array('wordlift/classification'));
1668
+		}, PHP_INT_MAX);
1669 1669
 
1670 1670
 		/**
1671 1671
 		 * @since 3.27.7
@@ -1682,59 +1682,59 @@  discard block
 block discarded – undo
1682 1682
 	 * @since    1.0.0
1683 1683
 	 * @access   private
1684 1684
 	 */
1685
-	private function define_public_hooks( $that ) {
1685
+	private function define_public_hooks($that) {
1686 1686
 
1687
-		$plugin_public = new Wordlift_Public( $that->get_plugin_name(), $that->get_version() );
1687
+		$plugin_public = new Wordlift_Public($that->get_plugin_name(), $that->get_version());
1688 1688
 
1689 1689
 		// Register the entity post type.
1690
-		$that->loader->add_action( 'init', $that->entity_post_type_service, 'register' );
1690
+		$that->loader->add_action('init', $that->entity_post_type_service, 'register');
1691 1691
 
1692 1692
 		// Bind the link generation and handling hooks to the entity link service.
1693
-		$that->loader->add_filter( 'post_type_link', $that->entity_link_service, 'post_type_link', 10, 4 );
1694
-		$that->loader->add_action( 'pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1693
+		$that->loader->add_filter('post_type_link', $that->entity_link_service, 'post_type_link', 10, 4);
1694
+		$that->loader->add_action('pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1);
1695 1695
 		// $that->loader->add_filter( 'wp_unique_post_slug_is_bad_flat_slug', $that->entity_link_service, 'wp_unique_post_slug_is_bad_flat_slug', 10, 3 );
1696 1696
 		// $that->loader->add_filter( 'wp_unique_post_slug_is_bad_hierarchical_slug', $that->entity_link_service, 'wp_unique_post_slug_is_bad_hierarchical_slug', 10, 4 );
1697 1697
 
1698
-		$that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1699
-		$that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1700
-		$that->loader->add_action( 'wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts' );
1698
+		$that->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
1699
+		$that->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
1700
+		$that->loader->add_action('wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts');
1701 1701
 
1702 1702
 		// Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1703
-		$that->loader->add_filter( 'the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1703
+		$that->loader->add_filter('the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags');
1704 1704
 		// Hook the content filter service to add entity links.
1705
-		if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1705
+		if ( ! defined('WL_DISABLE_CONTENT_FILTER') || ! WL_DISABLE_CONTENT_FILTER) {
1706 1706
 			// We run before other filters.
1707
-			$that->loader->add_filter( 'the_content', $that->content_filter_service, 'the_content', 9 );
1707
+			$that->loader->add_filter('the_content', $that->content_filter_service, 'the_content', 9);
1708 1708
 		}
1709 1709
 
1710 1710
 		// Hook the AJAX wl_timeline action to the Timeline service.
1711
-		$that->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1711
+		$that->loader->add_action('wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline');
1712 1712
 
1713 1713
 		// Hook the ShareThis service.
1714
-		$that->loader->add_filter( 'the_content', $that->sharethis_service, 'the_content', 99 );
1715
-		$that->loader->add_filter( 'the_excerpt', $that->sharethis_service, 'the_excerpt', 99 );
1714
+		$that->loader->add_filter('the_content', $that->sharethis_service, 'the_content', 99);
1715
+		$that->loader->add_filter('the_excerpt', $that->sharethis_service, 'the_excerpt', 99);
1716 1716
 
1717 1717
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1718
-		$that->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1718
+		$that->loader->add_action('wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get');
1719 1719
 
1720 1720
 		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1721 1721
 		// in order to tweak WP's `WP_Query` to include entities in queries related
1722 1722
 		// to categories.
1723
-		$that->loader->add_action( 'pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1723
+		$that->loader->add_action('pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1);
1724 1724
 
1725 1725
 		/*
1726 1726
 		 * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service`
1727 1727
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1728 1728
 		 * order of start time.
1729 1729
 		 */
1730
-		$that->loader->add_action( 'pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1 );
1730
+		$that->loader->add_action('pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1);
1731 1731
 
1732 1732
 		// This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1733
-		$that->loader->add_action( 'save_post', $that->entity_type_adapter, 'save_post', 9, 3 );
1733
+		$that->loader->add_action('save_post', $that->entity_type_adapter, 'save_post', 9, 3);
1734 1734
 
1735 1735
 		// Analytics Script Frontend.
1736
-		if ( apply_filters( 'wl_feature__enable__analytics', true ) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable() ) {
1737
-			$that->loader->add_action( 'wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10 );
1736
+		if (apply_filters('wl_feature__enable__analytics', true) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable()) {
1737
+			$that->loader->add_action('wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10);
1738 1738
 		}
1739 1739
 
1740 1740
 	}
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
 		 * @since 3.27.6
1800 1800
 		 */
1801 1801
 
1802
-		wp_register_script( 'wl_enabled_blocks', false );
1802
+		wp_register_script('wl_enabled_blocks', false);
1803 1803
 
1804 1804
 		$enabled_blocks = array();
1805 1805
 
@@ -1807,13 +1807,13 @@  discard block
 block discarded – undo
1807 1807
 		 * Filter name: wl_feature__enable__product-navigator
1808 1808
 		 * @since 3.32.3
1809 1809
 		 */
1810
-		if ( apply_filters( 'wl_feature__enable__product-navigator', true ) ) {
1810
+		if (apply_filters('wl_feature__enable__product-navigator', true)) {
1811 1811
 			$enabled_blocks[] = 'wordlift/products-navigator';
1812 1812
 		}
1813 1813
 
1814
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1814
+		if (apply_filters('wl_feature__enable__blocks', true)) {
1815 1815
 			// To intimate JS
1816
-			$enabled_blocks = array_merge( $enabled_blocks, array(
1816
+			$enabled_blocks = array_merge($enabled_blocks, array(
1817 1817
 				'wordlift/navigator',
1818 1818
 				'wordlift/chord',
1819 1819
 				'wordlift/geomap',
@@ -1821,11 +1821,11 @@  discard block
 block discarded – undo
1821 1821
 				'wordlift/cloud',
1822 1822
 				'wordlift/vocabulary',
1823 1823
 				'wordlift/faceted-search'
1824
-			) );
1824
+			));
1825 1825
 		}
1826 1826
 
1827
-		wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
1828
-		wp_enqueue_script( 'wl_enabled_blocks' );
1827
+		wp_localize_script('wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks);
1828
+		wp_enqueue_script('wl_enabled_blocks');
1829 1829
 	}
1830 1830
 
1831 1831
 	/**
@@ -1833,13 +1833,13 @@  discard block
 block discarded – undo
1833 1833
 	 */
1834 1834
 	public function register_screens() {
1835 1835
 		// Hook the menu to the Download Your Data page.
1836
-		if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
1837
-			Assertions::is_set( $this->download_your_data_page, "`download_your_data_page` can't be null" );
1838
-			add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
1836
+		if (apply_filters('wl_feature__enable__settings-download', true)) {
1837
+			Assertions::is_set($this->download_your_data_page, "`download_your_data_page` can't be null");
1838
+			add_action('admin_menu', array($this->download_your_data_page, 'admin_menu'), 100, 0);
1839 1839
 		}
1840 1840
 
1841
-		Assertions::is_set( $this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null" );
1842
-		add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
1841
+		Assertions::is_set($this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null");
1842
+		add_action('admin_menu', array($this->entity_type_settings_admin_page, 'admin_menu'), 100, 0);
1843 1843
 
1844 1844
 	}
1845 1845
 
Please login to merge, or discard this patch.
src/wordlift/jsonld/class-mentions.php 2 patches
Indentation   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -16,69 +16,69 @@
 block discarded – undo
16 16
 
17 17
 class Mentions {
18 18
 
19
-	public function __construct() {
20
-		add_filter( 'wl_after_get_jsonld', array( $this, 'wl_after_get_jsonld' ), 10, 2 );
21
-	}
19
+    public function __construct() {
20
+        add_filter( 'wl_after_get_jsonld', array( $this, 'wl_after_get_jsonld' ), 10, 2 );
21
+    }
22 22
 
23
-	public function wl_after_get_jsonld( $jsonld, $post_id ) {
23
+    public function wl_after_get_jsonld( $jsonld, $post_id ) {
24 24
 
25
-		if ( count( $jsonld ) === 0 || ! array_key_exists( '@type', $jsonld[0] ) || array_key_exists( 'mentions', $jsonld[0] ) ) {
26
-			return $jsonld;
27
-		}
25
+        if ( count( $jsonld ) === 0 || ! array_key_exists( '@type', $jsonld[0] ) || array_key_exists( 'mentions', $jsonld[0] ) ) {
26
+            return $jsonld;
27
+        }
28 28
 
29 29
 
30
-		$type = $jsonld[0]['@type'];
30
+        $type = $jsonld[0]['@type'];
31 31
 
32 32
 
33 33
 
34
-		if ( ! $this->entity_is_descendant_of_creative_work( $type ) && ! $this->entity_is_creative_work( $type ) ) {
35
-			return $jsonld;
36
-		}
34
+        if ( ! $this->entity_is_descendant_of_creative_work( $type ) && ! $this->entity_is_creative_work( $type ) ) {
35
+            return $jsonld;
36
+        }
37 37
 
38
-		$entity_references = Object_Relation_Service::get_instance()
39
-		                                            ->get_references( $post_id, Object_Type_Enum::POST );
38
+        $entity_references = Object_Relation_Service::get_instance()
39
+                                                    ->get_references( $post_id, Object_Type_Enum::POST );
40 40
 
41 41
 
42 42
 
43
-		$jsonld[0]['mentions'] = array_values( array_filter( array_map( function ( $item ) {
44
-			$id = \Wordlift_Entity_Service::get_instance()->get_uri( $item->get_id() );
45
-			if ( ! $id ) {
46
-				return false;
47
-			}
43
+        $jsonld[0]['mentions'] = array_values( array_filter( array_map( function ( $item ) {
44
+            $id = \Wordlift_Entity_Service::get_instance()->get_uri( $item->get_id() );
45
+            if ( ! $id ) {
46
+                return false;
47
+            }
48 48
 
49
-			return array( '@id' => $id );
49
+            return array( '@id' => $id );
50 50
 
51
-		}, $entity_references ) ) );
51
+        }, $entity_references ) ) );
52 52
 
53 53
 
54
-		return $jsonld;
55
-	}
54
+        return $jsonld;
55
+    }
56 56
 
57 57
 
58
-	private function entity_is_descendant_of_creative_work( $type ) {
58
+    private function entity_is_descendant_of_creative_work( $type ) {
59 59
 
60
-		if ( ! is_array( $type ) ) {
61
-			$type = array( $type );
62
-		}
60
+        if ( ! is_array( $type ) ) {
61
+            $type = array( $type );
62
+        }
63 63
 
64
-		$creative_work_term = get_term_by( 'name', 'CreativeWork', \Wordlift_Entity_Type_Taxonomy_Service::TAXONOMY_NAME );
64
+        $creative_work_term = get_term_by( 'name', 'CreativeWork', \Wordlift_Entity_Type_Taxonomy_Service::TAXONOMY_NAME );
65 65
 
66
-		if ( ! $creative_work_term ) {
67
-			return false;
68
-		}
66
+        if ( ! $creative_work_term ) {
67
+            return false;
68
+        }
69 69
 
70
-		$descendants = get_term_meta( $creative_work_term->term_id, '_wl_parent_of' );
70
+        $descendants = get_term_meta( $creative_work_term->term_id, '_wl_parent_of' );
71 71
 
72
-		$slugs_to_schema_name = array_map( function ( $item ) {
73
-			return implode( '', array_map( 'ucfirst', explode( '-', $item ) ) );
74
-		}, $descendants );
72
+        $slugs_to_schema_name = array_map( function ( $item ) {
73
+            return implode( '', array_map( 'ucfirst', explode( '-', $item ) ) );
74
+        }, $descendants );
75 75
 
76
-		return count( array_intersect( $type, $slugs_to_schema_name ) ) > 0;
76
+        return count( array_intersect( $type, $slugs_to_schema_name ) ) > 0;
77 77
 
78
-	}
78
+    }
79 79
 
80
-	private function entity_is_creative_work( $type ) {
81
-		return ( $type === 'CreativeWork' ) || ( is_array( $type ) && in_array( 'CreativeWork', $type ) );
82
-	}
80
+    private function entity_is_creative_work( $type ) {
81
+        return ( $type === 'CreativeWork' ) || ( is_array( $type ) && in_array( 'CreativeWork', $type ) );
82
+    }
83 83
 
84 84
 }
85 85
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -17,12 +17,12 @@  discard block
 block discarded – undo
17 17
 class Mentions {
18 18
 
19 19
 	public function __construct() {
20
-		add_filter( 'wl_after_get_jsonld', array( $this, 'wl_after_get_jsonld' ), 10, 2 );
20
+		add_filter('wl_after_get_jsonld', array($this, 'wl_after_get_jsonld'), 10, 2);
21 21
 	}
22 22
 
23
-	public function wl_after_get_jsonld( $jsonld, $post_id ) {
23
+	public function wl_after_get_jsonld($jsonld, $post_id) {
24 24
 
25
-		if ( count( $jsonld ) === 0 || ! array_key_exists( '@type', $jsonld[0] ) || array_key_exists( 'mentions', $jsonld[0] ) ) {
25
+		if (count($jsonld) === 0 || ! array_key_exists('@type', $jsonld[0]) || array_key_exists('mentions', $jsonld[0])) {
26 26
 			return $jsonld;
27 27
 		}
28 28
 
@@ -31,54 +31,54 @@  discard block
 block discarded – undo
31 31
 
32 32
 
33 33
 
34
-		if ( ! $this->entity_is_descendant_of_creative_work( $type ) && ! $this->entity_is_creative_work( $type ) ) {
34
+		if ( ! $this->entity_is_descendant_of_creative_work($type) && ! $this->entity_is_creative_work($type)) {
35 35
 			return $jsonld;
36 36
 		}
37 37
 
38 38
 		$entity_references = Object_Relation_Service::get_instance()
39
-		                                            ->get_references( $post_id, Object_Type_Enum::POST );
39
+		                                            ->get_references($post_id, Object_Type_Enum::POST);
40 40
 
41 41
 
42 42
 
43
-		$jsonld[0]['mentions'] = array_values( array_filter( array_map( function ( $item ) {
44
-			$id = \Wordlift_Entity_Service::get_instance()->get_uri( $item->get_id() );
45
-			if ( ! $id ) {
43
+		$jsonld[0]['mentions'] = array_values(array_filter(array_map(function($item) {
44
+			$id = \Wordlift_Entity_Service::get_instance()->get_uri($item->get_id());
45
+			if ( ! $id) {
46 46
 				return false;
47 47
 			}
48 48
 
49
-			return array( '@id' => $id );
49
+			return array('@id' => $id);
50 50
 
51
-		}, $entity_references ) ) );
51
+		}, $entity_references)));
52 52
 
53 53
 
54 54
 		return $jsonld;
55 55
 	}
56 56
 
57 57
 
58
-	private function entity_is_descendant_of_creative_work( $type ) {
58
+	private function entity_is_descendant_of_creative_work($type) {
59 59
 
60
-		if ( ! is_array( $type ) ) {
61
-			$type = array( $type );
60
+		if ( ! is_array($type)) {
61
+			$type = array($type);
62 62
 		}
63 63
 
64
-		$creative_work_term = get_term_by( 'name', 'CreativeWork', \Wordlift_Entity_Type_Taxonomy_Service::TAXONOMY_NAME );
64
+		$creative_work_term = get_term_by('name', 'CreativeWork', \Wordlift_Entity_Type_Taxonomy_Service::TAXONOMY_NAME);
65 65
 
66
-		if ( ! $creative_work_term ) {
66
+		if ( ! $creative_work_term) {
67 67
 			return false;
68 68
 		}
69 69
 
70
-		$descendants = get_term_meta( $creative_work_term->term_id, '_wl_parent_of' );
70
+		$descendants = get_term_meta($creative_work_term->term_id, '_wl_parent_of');
71 71
 
72
-		$slugs_to_schema_name = array_map( function ( $item ) {
73
-			return implode( '', array_map( 'ucfirst', explode( '-', $item ) ) );
74
-		}, $descendants );
72
+		$slugs_to_schema_name = array_map(function($item) {
73
+			return implode('', array_map('ucfirst', explode('-', $item)));
74
+		}, $descendants);
75 75
 
76
-		return count( array_intersect( $type, $slugs_to_schema_name ) ) > 0;
76
+		return count(array_intersect($type, $slugs_to_schema_name)) > 0;
77 77
 
78 78
 	}
79 79
 
80
-	private function entity_is_creative_work( $type ) {
81
-		return ( $type === 'CreativeWork' ) || ( is_array( $type ) && in_array( 'CreativeWork', $type ) );
80
+	private function entity_is_creative_work($type) {
81
+		return ($type === 'CreativeWork') || (is_array($type) && in_array('CreativeWork', $type));
82 82
 	}
83 83
 
84 84
 }
85 85
\ No newline at end of file
Please login to merge, or discard this patch.