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