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