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