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