Completed
Push — master ( 3c764a...1ee0e2 )
by Naveen
02:05 queued 58s
created
src/includes/class-wordlift.php 1 patch
Spacing   +286 added lines, -286 removed lines patch added patch discarded remove patch
@@ -637,15 +637,15 @@  discard block
 block discarded – undo
637 637
 		$that = $this;
638 638
 		add_action(
639 639
 			'plugins_loaded',
640
-			function () use ( $that ) {
641
-				$that->define_admin_hooks( $that );
642
-				$that->define_public_hooks( $that );
640
+			function() use ($that) {
641
+				$that->define_admin_hooks($that);
642
+				$that->define_public_hooks($that);
643 643
 			},
644 644
 			4
645 645
 		);
646 646
 
647 647
 		// If we're in `WP_CLI` load the related files.
648
-		if ( class_exists( 'WP_CLI' ) ) {
648
+		if (class_exists('WP_CLI')) {
649 649
 			$this->load_cli_dependencies();
650 650
 		}
651 651
 
@@ -685,329 +685,329 @@  discard block
 block discarded – undo
685 685
 		 * The class responsible for orchestrating the actions and filters of the
686 686
 		 * core plugin.
687 687
 		 */
688
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-loader.php';
688
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-loader.php';
689 689
 
690 690
 		// The class responsible for plugin uninstall.
691
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-deactivator-feedback.php';
691
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-deactivator-feedback.php';
692 692
 
693 693
 		/**
694 694
 		 * The class responsible for defining internationalization functionality
695 695
 		 * of the plugin.
696 696
 		 */
697
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-i18n.php';
697
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-i18n.php';
698 698
 
699 699
 		/**
700 700
 		 * WordLift's supported languages.
701 701
 		 */
702
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-languages.php';
702
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-languages.php';
703 703
 
704 704
 		/**
705 705
 		 * WordLift's supported countries.
706 706
 		 */
707
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-countries.php';
707
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-countries.php';
708 708
 
709 709
 		/**
710 710
 		 * Provide support functions to sanitize data.
711 711
 		 */
712
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-sanitizer.php';
712
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-sanitizer.php';
713 713
 
714 714
 		/** Services. */
715
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-log-service.php';
716
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-http-api.php';
717
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-redirect-service.php';
718
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-configuration-service.php';
719
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-post-type-service.php';
720
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-type-service.php';
721
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-link-service.php';
722
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-relation-service.php';
723
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-image-service.php';
715
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-log-service.php';
716
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-http-api.php';
717
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-redirect-service.php';
718
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-configuration-service.php';
719
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-post-type-service.php';
720
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-type-service.php';
721
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-link-service.php';
722
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-relation-service.php';
723
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-image-service.php';
724 724
 
725 725
 		/**
726 726
 		 * The Schema service.
727 727
 		 */
728
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-schema-service.php';
728
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-schema-service.php';
729 729
 
730 730
 		/**
731 731
 		 * The schema:url property service.
732 732
 		 */
733
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-property-service.php';
734
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-schema-url-property-service.php';
733
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-property-service.php';
734
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-schema-url-property-service.php';
735 735
 
736 736
 		/**
737 737
 		 * The UI service.
738 738
 		 */
739
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-ui-service.php';
739
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-ui-service.php';
740 740
 
741 741
 		/**
742 742
 		 * The Entity Types Taxonomy service.
743 743
 		 */
744
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-type-taxonomy-service.php';
744
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-type-taxonomy-service.php';
745 745
 
746 746
 		/**
747 747
 		 * The Entity service.
748 748
 		 */
749
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-uri-service.php';
750
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-service.php';
749
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-uri-service.php';
750
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-service.php';
751 751
 
752 752
 		// Add the entity rating service.
753
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-rating-service.php';
753
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-rating-service.php';
754 754
 
755 755
 		/**
756 756
 		 * The User service.
757 757
 		 */
758
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-user-service.php';
758
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-user-service.php';
759 759
 
760 760
 		/**
761 761
 		 * The Timeline service.
762 762
 		 */
763
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-timeline-service.php';
763
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-timeline-service.php';
764 764
 
765 765
 		/**
766 766
 		 * The Topic Taxonomy service.
767 767
 		 */
768
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-topic-taxonomy-service.php';
768
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-topic-taxonomy-service.php';
769 769
 
770 770
 		/**
771 771
 		 * The WordLift URI service.
772 772
 		 */
773
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-uri-service.php';
774
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-property-factory.php';
775
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-sample-data-service.php';
773
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-uri-service.php';
774
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-property-factory.php';
775
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-sample-data-service.php';
776 776
 
777
-		require_once plugin_dir_path( __DIR__ ) . 'includes/properties/class-wordlift-property-getter-factory.php';
778
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-attachment-service.php';
777
+		require_once plugin_dir_path(__DIR__).'includes/properties/class-wordlift-property-getter-factory.php';
778
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-attachment-service.php';
779 779
 
780 780
 		/**
781 781
 		 * Load the converters.
782 782
 		 */
783
-		require_once plugin_dir_path( __DIR__ ) . 'includes/intf-wordlift-post-converter.php';
784
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
785
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
786
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
787
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
788
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-website-jsonld-converter.php';
783
+		require_once plugin_dir_path(__DIR__).'includes/intf-wordlift-post-converter.php';
784
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
785
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-postid-to-jsonld-converter.php';
786
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-post-to-jsonld-converter.php';
787
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-post-to-jsonld-converter.php';
788
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-website-jsonld-converter.php';
789 789
 
790 790
 		/**
791 791
 		 * Load cache-related files.
792 792
 		 */
793
-		require_once plugin_dir_path( __DIR__ ) . 'includes/cache/require.php';
793
+		require_once plugin_dir_path(__DIR__).'includes/cache/require.php';
794 794
 
795 795
 		/**
796 796
 		 * Load the content filter.
797 797
 		 */
798
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-content-filter-service.php';
798
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-content-filter-service.php';
799 799
 
800 800
 		/*
801 801
 		 * Load the excerpt helper.
802 802
 		 */
803
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-post-excerpt-helper.php';
803
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-post-excerpt-helper.php';
804 804
 
805 805
 		/**
806 806
 		 * Load the JSON-LD service to publish entities using JSON-LD.s
807 807
 		 *
808 808
 		 * @since 3.8.0
809 809
 		 */
810
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-jsonld-service.php';
810
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-jsonld-service.php';
811 811
 
812 812
 		// The Publisher Service and the AJAX adapter.
813
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-publisher-service.php';
814
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
813
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-publisher-service.php';
814
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-publisher-ajax-adapter.php';
815 815
 
816
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-post-adapter.php';
816
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-post-adapter.php';
817 817
 
818 818
 		/**
819 819
 		 * Load the WordLift key validation service.
820 820
 		 */
821
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-key-validation-service.php';
821
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-key-validation-service.php';
822 822
 
823 823
 		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
824
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-category-taxonomy-service.php';
824
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-category-taxonomy-service.php';
825 825
 
826 826
 		// Load the `Wordlift_Entity_Page_Service` class definition.
827
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-page-service.php';
827
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-page-service.php';
828 828
 
829 829
 		/** Linked Data. */
830
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-storage.php';
831
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
832
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php';
833
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
834
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
835
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php';
836
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
837
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php';
838
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php';
839
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php';
840
-		require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php';
830
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-storage.php';
831
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-meta-storage.php';
832
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-property-storage.php';
833
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php';
834
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php';
835
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-author-storage.php';
836
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php';
837
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-image-storage.php';
838
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-related-storage.php';
839
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-url-property-storage.php';
840
+		require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-storage-factory.php';
841 841
 
842 842
 		/** Services. */
843
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-google-analytics-export-service.php';
844
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-api-service.php';
843
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-google-analytics-export-service.php';
844
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-api-service.php';
845 845
 
846 846
 		/** Adapters. */
847
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-tinymce-adapter.php';
848
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-newrelic-adapter.php';
849
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
850
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-type-adapter.php';
851
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-wprocket-adapter.php';
852
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-nitropack-adapter.php';
847
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-tinymce-adapter.php';
848
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-newrelic-adapter.php';
849
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-sample-data-ajax-adapter.php';
850
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-type-adapter.php';
851
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-wprocket-adapter.php';
852
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-nitropack-adapter.php';
853 853
 
854 854
 		/** Autocomplete. */
855
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-autocomplete-adapter.php';
855
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-autocomplete-adapter.php';
856 856
 
857
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-remote-image-service.php';
857
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-remote-image-service.php';
858 858
 
859 859
 		/** Analytics */
860
-		require_once plugin_dir_path( __DIR__ ) . 'includes/analytics/class-wordlift-analytics-connect.php';
860
+		require_once plugin_dir_path(__DIR__).'includes/analytics/class-wordlift-analytics-connect.php';
861 861
 
862 862
 		/**
863 863
 		 * The class responsible for defining all actions that occur in the admin area.
864 864
 		 */
865
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin.php';
865
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin.php';
866 866
 
867 867
 		/**
868 868
 		 * The class to customize the entity list admin page.
869 869
 		 */
870
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-list-service.php';
870
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-list-service.php';
871 871
 
872 872
 		/**
873 873
 		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
874 874
 		 */
875 875
 		global $wp_version;
876
-		if ( version_compare( $wp_version, '5.3', '<' ) ) {
877
-			require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
876
+		if (version_compare($wp_version, '5.3', '<')) {
877
+			require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-types-taxonomy-walker.php';
878 878
 		} else {
879
-			require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
879
+			require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php';
880 880
 		}
881 881
 
882 882
 		/**
883 883
 		 * The Notice service.
884 884
 		 */
885
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-notice-service.php';
885
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-notice-service.php';
886 886
 
887 887
 		/**
888 888
 		 * The PrimaShop adapter.
889 889
 		 */
890
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-primashop-adapter.php';
890
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-primashop-adapter.php';
891 891
 
892 892
 		/**
893 893
 		 * The WordLift Dashboard service.
894 894
 		 */
895
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-dashboard-service.php';
895
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-dashboard-service.php';
896 896
 
897 897
 		/**
898 898
 		 * The admin 'Install wizard' page.
899 899
 		 */
900
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-setup.php';
900
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-setup.php';
901 901
 
902 902
 		/**
903 903
 		 * The WordLift entity type list admin page controller.
904 904
 		 */
905
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
905
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
906 906
 
907 907
 		/**
908 908
 		 * The WordLift entity type settings admin page controller.
909 909
 		 */
910
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-entity-type-settings.php';
910
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-entity-type-settings.php';
911 911
 
912 912
 		/**
913 913
 		 * The admin 'Download Your Data' page.
914 914
 		 */
915
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-download-your-data-page.php';
915
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-download-your-data-page.php';
916 916
 
917 917
 		/**
918 918
 		 * The admin 'WordLift Settings' page.
919 919
 		 */
920
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/intf-wordlift-admin-element.php';
921
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-input-element.php';
922
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-radio-input-element.php';
923
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-select-element.php';
924
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-select2-element.php';
925
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-language-select-element.php';
926
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-country-select-element.php';
927
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-tabs-element.php';
928
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-author-element.php';
929
-		require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-publisher-element.php';
930
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-page.php';
931
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-page.php';
932
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-analytics-page.php';
933
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
934
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
920
+		require_once plugin_dir_path(__DIR__).'admin/elements/intf-wordlift-admin-element.php';
921
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-input-element.php';
922
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-radio-input-element.php';
923
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-select-element.php';
924
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-select2-element.php';
925
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-language-select-element.php';
926
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-country-select-element.php';
927
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-tabs-element.php';
928
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-author-element.php';
929
+		require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-publisher-element.php';
930
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-page.php';
931
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-page.php';
932
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-analytics-page.php';
933
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-page-action-link.php';
934
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-analytics-page-action-link.php';
935 935
 
936 936
 		/** Admin Pages */
937
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-user-profile-page.php';
938
-		require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-type-admin-service.php';
937
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-user-profile-page.php';
938
+		require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-type-admin-service.php';
939 939
 
940 940
 		/**
941 941
 		 * The class responsible for defining all actions that occur in the public-facing
942 942
 		 * side of the site.
943 943
 		 */
944
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-public.php';
944
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-public.php';
945 945
 
946 946
 		/**
947 947
 		 * The shortcode abstract class.
948 948
 		 */
949
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-shortcode.php';
949
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-shortcode.php';
950 950
 
951 951
 		/**
952 952
 		 * The Timeline shortcode.
953 953
 		 */
954
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-timeline-shortcode.php';
954
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-timeline-shortcode.php';
955 955
 
956 956
 		/**
957 957
 		 * The Navigator shortcode.
958 958
 		 */
959
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-navigator-shortcode.php';
959
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-navigator-shortcode.php';
960 960
 
961 961
 		/**
962 962
 		 * The Products Navigator shortcode.
963 963
 		 */
964
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-products-navigator-shortcode.php';
964
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-products-navigator-shortcode.php';
965 965
 
966 966
 		/**
967 967
 		 * The chord shortcode.
968 968
 		 */
969
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-chord-shortcode.php';
969
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-chord-shortcode.php';
970 970
 
971 971
 		/**
972 972
 		 * The geomap shortcode.
973 973
 		 */
974
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-geomap-shortcode.php';
974
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-geomap-shortcode.php';
975 975
 
976 976
 		/**
977 977
 		 * The entity cloud shortcode.
978 978
 		 */
979
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
979
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-related-entities-cloud-shortcode.php';
980 980
 
981 981
 		/**
982 982
 		 * The entity glossary shortcode.
983 983
 		 */
984
-		require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-alphabet-service.php';
985
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-vocabulary-shortcode.php';
984
+		require_once plugin_dir_path(__DIR__).'includes/class-wordlift-alphabet-service.php';
985
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-vocabulary-shortcode.php';
986 986
 
987 987
 		/**
988 988
 		 * Faceted Search shortcode.
989 989
 		 */
990
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-faceted-search-shortcode.php';
990
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-faceted-search-shortcode.php';
991 991
 
992 992
 		/**
993 993
 		 * The ShareThis service.
994 994
 		 */
995
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-sharethis-service.php';
995
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-sharethis-service.php';
996 996
 
997 997
 		/**
998 998
 		 * The SEO service.
999 999
 		 */
1000
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-seo-service.php';
1000
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-seo-service.php';
1001 1001
 
1002 1002
 		/**
1003 1003
 		 * The AMP service.
1004 1004
 		 */
1005
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-amp-service.php';
1005
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-amp-service.php';
1006 1006
 
1007 1007
 		/** Widgets */
1008
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-widget.php';
1009
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-related-entities-cloud-widget.php';
1010
-		require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-context-cards-service.php';
1008
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-widget.php';
1009
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-related-entities-cloud-widget.php';
1010
+		require_once plugin_dir_path(__DIR__).'public/class-wordlift-context-cards-service.php';
1011 1011
 
1012 1012
 		/*
1013 1013
 		 * Batch Operations. They're similar to Batch Actions but do not require working on post types.
@@ -1016,8 +1016,8 @@  discard block
 block discarded – undo
1016 1016
 		 *
1017 1017
 		 * @since 3.20.0
1018 1018
 		 */
1019
-		require_once plugin_dir_path( __DIR__ ) . 'includes/batch/intf-wordlift-batch-operation.php';
1020
-		require_once plugin_dir_path( __DIR__ ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1019
+		require_once plugin_dir_path(__DIR__).'includes/batch/intf-wordlift-batch-operation.php';
1020
+		require_once plugin_dir_path(__DIR__).'includes/batch/class-wordlift-batch-operation-ajax-adapter.php';
1021 1021
 
1022 1022
 		/*
1023 1023
 		 * Schema.org Services.
@@ -1025,10 +1025,10 @@  discard block
 block discarded – undo
1025 1025
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1026 1026
 		 */
1027 1027
 		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1028
-		if ( apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) {
1029
-			require_once plugin_dir_path( __DIR__ ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1030
-			require_once plugin_dir_path( __DIR__ ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1031
-			require_once plugin_dir_path( __DIR__ ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1028
+		if (apply_filters('wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES)) {
1029
+			require_once plugin_dir_path(__DIR__).'includes/schemaorg/class-wordlift-schemaorg-sync-service.php';
1030
+			require_once plugin_dir_path(__DIR__).'includes/schemaorg/class-wordlift-schemaorg-property-service.php';
1031
+			require_once plugin_dir_path(__DIR__).'includes/schemaorg/class-wordlift-schemaorg-class-service.php';
1032 1032
 			new Wordlift_Schemaorg_Sync_Service();
1033 1033
 			$schemaorg_property_service = Wordlift_Schemaorg_Property_Service::get_instance();
1034 1034
 			new Wordlift_Schemaorg_Class_Service();
@@ -1044,13 +1044,13 @@  discard block
 block discarded – undo
1044 1044
 
1045 1045
 		// Instantiate a global logger.
1046 1046
 		global $wl_logger;
1047
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
1047
+		$wl_logger = Wordlift_Log_Service::get_logger('WordLift');
1048 1048
 
1049 1049
 		// Load the `wl-api` end-point.
1050 1050
 		new Wordlift_Http_Api();
1051 1051
 
1052 1052
 		// Load the Install Service.
1053
-		require_once plugin_dir_path( __DIR__ ) . 'install/class-wordlift-install-service.php';
1053
+		require_once plugin_dir_path(__DIR__).'install/class-wordlift-install-service.php';
1054 1054
 		$this->install_service = new Wordlift_Install_Service();
1055 1055
 		$this->notice_service  = new Wordlift_Notice_Service();
1056 1056
 		$this->user_service    = Wordlift_User_Service::get_instance();
@@ -1072,21 +1072,21 @@  discard block
 block discarded – undo
1072 1072
 		add_action(
1073 1073
 			'plugins_loaded',
1074 1074
 			// phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
1075
-			function () use ( &$that, $schemaorg_property_service ) {
1075
+			function() use (&$that, $schemaorg_property_service) {
1076 1076
 
1077 1077
 				/** Services. */
1078 1078
 				// Create the configuration service.
1079 1079
 				new Wordlift_Api_Service();
1080 1080
 
1081 1081
 				// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
1082
-				$that->entity_link_service = new Wordlift_Entity_Link_Service( $that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() );
1082
+				$that->entity_link_service = new Wordlift_Entity_Link_Service($that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path());
1083 1083
 
1084 1084
 				$schema_url_property_service = new Wordlift_Schema_Url_Property_Service();
1085 1085
 
1086 1086
 				$that->entity_uri_service = Wordlift_Entity_Uri_Service::get_instance();
1087 1087
 
1088 1088
 				// Create a new instance of the Redirect service.
1089
-				$that->redirect_service = new Wordlift_Redirect_Service( $that->entity_uri_service );
1089
+				$that->redirect_service = new Wordlift_Redirect_Service($that->entity_uri_service);
1090 1090
 
1091 1091
 				// Create a new instance of the Timeline service and Timeline shortcode.
1092 1092
 				$that->timeline_service = new Wordlift_Timeline_Service();
@@ -1099,30 +1099,30 @@  discard block
 block discarded – undo
1099 1099
 				// Create an instance of the PrimaShop adapter.
1100 1100
 				$that->primashop_adapter = new Wordlift_PrimaShop_Adapter();
1101 1101
 
1102
-				$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
1102
+				$uri_service = new Wordlift_Uri_Service($GLOBALS['wpdb']);
1103 1103
 
1104 1104
 				// Create the entity rating service.
1105 1105
 				$that->rating_service = Wordlift_Rating_Service::get_instance();
1106 1106
 
1107 1107
 				// Create entity list customization (wp-admin/edit.php).
1108
-				$that->entity_list_service = new Wordlift_Entity_List_Service( $that->rating_service );
1108
+				$that->entity_list_service = new Wordlift_Entity_List_Service($that->rating_service);
1109 1109
 
1110 1110
 				// Create an instance of the Publisher Service and the AJAX Adapter.
1111 1111
 				$that->publisher_service = Wordlift_Publisher_Service::get_instance();
1112
-				$that->property_factory  = new Wordlift_Property_Factory( $schema_url_property_service );
1113
-				$that->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1112
+				$that->property_factory  = new Wordlift_Property_Factory($schema_url_property_service);
1113
+				$that->property_factory->register(Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service);
1114 1114
 
1115 1115
 				$attachment_service = Wordlift_Attachment_Service::get_instance();
1116 1116
 
1117 1117
 				// Instantiate the JSON-LD service.
1118 1118
 				$property_getter                       = Wordlift_Property_Getter_Factory::create();
1119
-				$that->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1120
-				$that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter );
1121
-				$that->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter( $that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter );
1122
-				$that->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service );
1119
+				$that->post_to_jsonld_converter        = new Wordlift_Post_To_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service);
1120
+				$that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter);
1121
+				$that->postid_to_jsonld_converter      = new Wordlift_Postid_To_Jsonld_Converter($that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter);
1122
+				$that->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service);
1123 1123
 
1124
-				$jsonld_cache                            = new Ttl_Cache( 'jsonld', 86400 );
1125
-				$that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $that->postid_to_jsonld_converter, $jsonld_cache );
1124
+				$jsonld_cache                            = new Ttl_Cache('jsonld', 86400);
1125
+				$that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter($that->postid_to_jsonld_converter, $jsonld_cache);
1126 1126
 				/*
1127 1127
 				* Load the `Wordlift_Term_JsonLd_Adapter`.
1128 1128
 				*
@@ -1130,22 +1130,22 @@  discard block
 block discarded – undo
1130 1130
 				*
1131 1131
 				* @since 3.20.0
1132 1132
 				*/
1133
-				require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-term-jsonld-adapter.php';
1133
+				require_once plugin_dir_path(__DIR__).'public/class-wordlift-term-jsonld-adapter.php';
1134 1134
 
1135
-				$term_jsonld_adapter  = new Wordlift_Term_JsonLd_Adapter( $that->entity_uri_service, $that->cached_postid_to_jsonld_converter );
1136
-				$that->jsonld_service = new Wordlift_Jsonld_Service( Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter );
1135
+				$term_jsonld_adapter  = new Wordlift_Term_JsonLd_Adapter($that->entity_uri_service, $that->cached_postid_to_jsonld_converter);
1136
+				$that->jsonld_service = new Wordlift_Jsonld_Service(Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter);
1137 1137
 
1138 1138
 				$jsonld_service = new Jsonld_Service(
1139 1139
 					$that->jsonld_service,
1140 1140
 					$term_jsonld_adapter,
1141
-					new Jsonld_User_Service( $that->user_service )
1141
+					new Jsonld_User_Service($that->user_service)
1142 1142
 				);
1143
-				new Jsonld_Endpoint( $jsonld_service, $that->entity_uri_service );
1143
+				new Jsonld_Endpoint($jsonld_service, $that->entity_uri_service);
1144 1144
 
1145 1145
 				// Prints the JSON-LD in the head.
1146
-				new Jsonld_Adapter( $that->jsonld_service );
1146
+				new Jsonld_Adapter($that->jsonld_service);
1147 1147
 
1148
-				new Jsonld_By_Id_Endpoint( $that->jsonld_service, $that->entity_uri_service );
1148
+				new Jsonld_By_Id_Endpoint($that->jsonld_service, $that->entity_uri_service);
1149 1149
 
1150 1150
 				/**
1151 1151
 				 * @since 3.37.1
@@ -1158,10 +1158,10 @@  discard block
 block discarded – undo
1158 1158
 				// Creating Faq Content filter service.
1159 1159
 				$that->faq_content_filter_service = new Faq_Content_Filter();
1160 1160
 				$that->sample_data_service        = Wordlift_Sample_Data_Service::get_instance();
1161
-				$that->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter( $that->sample_data_service );
1161
+				$that->sample_data_ajax_adapter   = new Wordlift_Sample_Data_Ajax_Adapter($that->sample_data_service);
1162 1162
 
1163
-				$that->loader->add_action( 'enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks' );
1164
-				$that->loader->add_action( 'admin_enqueue_scripts', $that, 'add_wl_enabled_blocks' );
1163
+				$that->loader->add_action('enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks');
1164
+				$that->loader->add_action('admin_enqueue_scripts', $that, 'add_wl_enabled_blocks');
1165 1165
 
1166 1166
 				/**
1167 1167
 				 * Filter: wl_feature__enable__blocks.
@@ -1171,15 +1171,15 @@  discard block
 block discarded – undo
1171 1171
 				 * @return bool
1172 1172
 				 * @since 3.27.6
1173 1173
 				 */
1174
-				if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1174
+				if (apply_filters('wl_feature__enable__blocks', true)) {
1175 1175
 					// Initialize the short-codes.
1176
-					new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() );
1176
+					new Async_Template_Decorator(new Wordlift_Navigator_Shortcode());
1177 1177
 					new Wordlift_Chord_Shortcode();
1178 1178
 					new Wordlift_Geomap_Shortcode();
1179 1179
 					new Wordlift_Timeline_Shortcode();
1180
-					new Wordlift_Related_Entities_Cloud_Shortcode( Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance() );
1180
+					new Wordlift_Related_Entities_Cloud_Shortcode(Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance());
1181 1181
 					new Wordlift_Vocabulary_Shortcode();
1182
-					new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() );
1182
+					new Async_Template_Decorator(new Wordlift_Faceted_Search_Shortcode());
1183 1183
 				}
1184 1184
 
1185 1185
 				new Wordlift_Products_Navigator_Shortcode();
@@ -1191,16 +1191,16 @@  discard block
 block discarded – undo
1191 1191
 				new Wordlift_Seo_Service();
1192 1192
 
1193 1193
 				// Initialize the AMP service.
1194
-				new Wordlift_AMP_Service( $that->jsonld_service );
1194
+				new Wordlift_AMP_Service($that->jsonld_service);
1195 1195
 
1196 1196
 				/** Services. */
1197 1197
 				$that->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service();
1198 1198
 				new Wordlift_Image_Service();
1199 1199
 
1200 1200
 				/** Adapters. */
1201
-				$that->entity_type_adapter    = new Wordlift_Entity_Type_Adapter( Wordlift_Entity_Type_Service::get_instance() );
1202
-				$that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $that->publisher_service );
1203
-				$that->tinymce_adapter        = new Wordlift_Tinymce_Adapter( $that );
1201
+				$that->entity_type_adapter    = new Wordlift_Entity_Type_Adapter(Wordlift_Entity_Type_Service::get_instance());
1202
+				$that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter($that->publisher_service);
1203
+				$that->tinymce_adapter        = new Wordlift_Tinymce_Adapter($that);
1204 1204
 
1205 1205
 				/*
1206 1206
 				* Exclude our public js from WP-Rocket.
@@ -1224,14 +1224,14 @@  discard block
 block discarded – undo
1224 1224
 				$that->language_select_element = new Wordlift_Admin_Language_Select_Element();
1225 1225
 				$that->country_select_element  = new Wordlift_Admin_Country_Select_Element();
1226 1226
 				$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1227
-				$that->publisher_element       = new Wordlift_Admin_Publisher_Element( $that->publisher_service, $tabs_element, $that->select2_element );
1228
-				$that->author_element          = new Wordlift_Admin_Author_Element( $that->publisher_service, $that->select2_element );
1227
+				$that->publisher_element       = new Wordlift_Admin_Publisher_Element($that->publisher_service, $tabs_element, $that->select2_element);
1228
+				$that->author_element          = new Wordlift_Admin_Author_Element($that->publisher_service, $that->select2_element);
1229 1229
 
1230 1230
 				$that->settings_page             = Wordlift_Admin_Settings_Page::get_instance();
1231
-				$that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $that->settings_page );
1231
+				$that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link($that->settings_page);
1232 1232
 
1233
-				$that->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page( $that->input_element, $that->radio_input_element );
1234
-				$that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $that->analytics_settings_page );
1233
+				$that->analytics_settings_page             = new Wordlift_Admin_Settings_Analytics_Page($that->input_element, $that->radio_input_element);
1234
+				$that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link($that->analytics_settings_page);
1235 1235
 				$that->analytics_connect                   = new Wordlift_Analytics_Connect();
1236 1236
 
1237 1237
 				// Pages.
@@ -1242,9 +1242,9 @@  discard block
 block discarded – undo
1242 1242
 				*
1243 1243
 				* @see https://github.com/insideout10/wordlift-plugin/issues/914
1244 1244
 				*/
1245
-				if ( apply_filters( 'wl_can_see_classification_box', true ) ) {
1246
-					require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-post-edit-page.php';
1247
-					new Wordlift_Admin_Post_Edit_Page( $that );
1245
+				if (apply_filters('wl_can_see_classification_box', true)) {
1246
+					require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-post-edit-page.php';
1247
+					new Wordlift_Admin_Post_Edit_Page($that);
1248 1248
 				}
1249 1249
 				new Wordlift_Entity_Type_Admin_Service();
1250 1250
 
@@ -1252,19 +1252,19 @@  discard block
 block discarded – undo
1252 1252
 				$that->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1253 1253
 
1254 1254
 				// Create an instance of the install wizard.
1255
-				$that->admin_setup = new Wordlift_Admin_Setup( $that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element );
1255
+				$that->admin_setup = new Wordlift_Admin_Setup($that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element);
1256 1256
 
1257
-				$that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $that->entity_post_type_service );
1257
+				$that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service($that->entity_post_type_service);
1258 1258
 
1259 1259
 				// User Profile.
1260
-				new Wordlift_Admin_User_Profile_Page( $that->author_element, $that->user_service );
1260
+				new Wordlift_Admin_User_Profile_Page($that->author_element, $that->user_service);
1261 1261
 
1262 1262
 				$that->entity_page_service = new Wordlift_Entity_Page_Service();
1263 1263
 
1264 1264
 				// Load the debug service if WP is in debug mode.
1265
-				if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1266
-					require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-debug-service.php';
1267
-					new Wordlift_Debug_Service( Wordlift_Entity_Service::get_instance(), $uri_service );
1265
+				if (defined('WP_DEBUG') && WP_DEBUG) {
1266
+					require_once plugin_dir_path(__DIR__).'includes/class-wordlift-debug-service.php';
1267
+					new Wordlift_Debug_Service(Wordlift_Entity_Service::get_instance(), $uri_service);
1268 1268
 				}
1269 1269
 
1270 1270
 				// Remote Image Service.
@@ -1277,12 +1277,12 @@  discard block
 block discarded – undo
1277 1277
 				*
1278 1278
 				* @see https://github.com/insideout10/wordlift-plugin/issues/852.
1279 1279
 				*/
1280
-				require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-batch-action.php';
1281
-				require_once plugin_dir_path( __DIR__ ) . 'includes/mapping/class-wordlift-mapping-service.php';
1282
-				require_once plugin_dir_path( __DIR__ ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1280
+				require_once plugin_dir_path(__DIR__).'includes/class-wordlift-batch-action.php';
1281
+				require_once plugin_dir_path(__DIR__).'includes/mapping/class-wordlift-mapping-service.php';
1282
+				require_once plugin_dir_path(__DIR__).'includes/mapping/class-wordlift-mapping-ajax-adapter.php';
1283 1283
 
1284 1284
 				// Create an instance of the Mapping Service and assign it to the Ajax Adapter.
1285
-				new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) );
1285
+				new Wordlift_Mapping_Ajax_Adapter(new Wordlift_Mapping_Service(Wordlift_Entity_Type_Service::get_instance()));
1286 1286
 
1287 1287
 				/*
1288 1288
 				* Load the Mappings JSON-LD post processing.
@@ -1296,11 +1296,11 @@  discard block
 block discarded – undo
1296 1296
 				// Taxonomy term rule validator for validating rules for term pages.
1297 1297
 				new Taxonomy_Term_Rule_Validator();
1298 1298
 				new Post_Taxonomy_Term_Rule_Validator();
1299
-				$rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator );
1300
-				$rule_groups_validator    = new Rule_Groups_Validator( $rule_validators_registry );
1301
-				$mappings_validator       = new Mappings_Validator( $mappings_dbo, $rule_groups_validator );
1299
+				$rule_validators_registry = new Rule_Validators_Registry($default_rule_validator);
1300
+				$rule_groups_validator    = new Rule_Groups_Validator($rule_validators_registry);
1301
+				$mappings_validator       = new Mappings_Validator($mappings_dbo, $rule_groups_validator);
1302 1302
 
1303
-				new Url_To_Entity_Transform_Function( $that->entity_uri_service );
1303
+				new Url_To_Entity_Transform_Function($that->entity_uri_service);
1304 1304
 				new Taxonomy_To_Terms_Transform_Function();
1305 1305
 				new Post_Id_To_Entity_Transform_Function();
1306 1306
 				$mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry();
@@ -1310,7 +1310,7 @@  discard block
 block discarded – undo
1310 1310
 				 * Intiailize the acf group data formatter.
1311 1311
 				 */
1312 1312
 				new Acf_Group_Formatter();
1313
-				new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry );
1313
+				new Jsonld_Converter($mappings_validator, $mappings_transform_functions_registry);
1314 1314
 
1315 1315
 				/**
1316 1316
 				 * @since 3.26.0
@@ -1328,16 +1328,16 @@  discard block
 block discarded – undo
1328 1328
 				// Call this static method to register FAQ routes to rest api - disabled
1329 1329
 				// Faq_Rest_Controller::register_routes();
1330 1330
 
1331
-				$that->storage_factory = new Wordlift_Storage_Factory( Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter );
1331
+				$that->storage_factory = new Wordlift_Storage_Factory(Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter);
1332 1332
 
1333 1333
 				/** WL Autocomplete. */
1334
-				$autocomplete_service       = new All_Autocomplete_Service(
1334
+				$autocomplete_service = new All_Autocomplete_Service(
1335 1335
 					array(
1336 1336
 						new Local_Autocomplete_Service(),
1337
-						new Linked_Data_Autocomplete_Service( Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance() ),
1337
+						new Linked_Data_Autocomplete_Service(Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance()),
1338 1338
 					)
1339 1339
 				);
1340
-				$that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service );
1340
+				$that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter($autocomplete_service);
1341 1341
 
1342 1342
 				/**
1343 1343
 				 * @since 3.27.2
@@ -1346,10 +1346,10 @@  discard block
 block discarded – undo
1346 1346
 				 */
1347 1347
 				new Recipe_Maker_Post_Type_Hook();
1348 1348
 				$recipe_maker_validation_service = new Recipe_Maker_Validation_Service();
1349
-				new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service );
1350
-				new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service );
1351
-				new Recipe_Maker_Jsonld_Swap( $recipe_maker_validation_service, $that->jsonld_service );
1352
-				new Recipe_Maker_Warning( $recipe_maker_validation_service );
1349
+				new Recipe_Maker_Jsonld_Hook($attachment_service, $recipe_maker_validation_service);
1350
+				new Recipe_Maker_After_Get_Jsonld_Hook($recipe_maker_validation_service);
1351
+				new Recipe_Maker_Jsonld_Swap($recipe_maker_validation_service, $that->jsonld_service);
1352
+				new Recipe_Maker_Warning($recipe_maker_validation_service);
1353 1353
 
1354 1354
 				new Duplicate_Markup_Remover();
1355 1355
 
@@ -1357,7 +1357,7 @@  discard block
 block discarded – undo
1357 1357
 				 * @since 3.27.8
1358 1358
 				 * @see https://github.com/insideout10/wordlift-plugin/issues/1248
1359 1359
 				 */
1360
-				new Key_Validation_Notice( $that->key_validation_service, Wordlift_Configuration_Service::get_instance() );
1360
+				new Key_Validation_Notice($that->key_validation_service, Wordlift_Configuration_Service::get_instance());
1361 1361
 				/**
1362 1362
 				 * @since 3.28.0
1363 1363
 				 * @see https://github.com/insideout10/wordlift-plugin/issues?q=assignee%3Anaveen17797+is%3Aopen
@@ -1368,7 +1368,7 @@  discard block
 block discarded – undo
1368 1368
 				 * @since 3.29.0
1369 1369
 				 * @see https://github.com/insideout10/wordlift-plugin/issues/1304
1370 1370
 				 */
1371
-				new Entity_Rest_Service( Wordlift_Entity_Type_Service::get_instance() );
1371
+				new Entity_Rest_Service(Wordlift_Entity_Type_Service::get_instance());
1372 1372
 
1373 1373
 				/**
1374 1374
 				 * Expand author in to references.
@@ -1377,12 +1377,12 @@  discard block
 block discarded – undo
1377 1377
 				 * @see https://github.com/insideout10/wordlift-plugin/issues/1318
1378 1378
 				 */
1379 1379
 				// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1380
-				if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) {
1381
-					new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter );
1380
+				if (apply_filters('wl_feature__enable__article-wrapper', false)) {
1381
+					new Jsonld_Article_Wrapper(Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter);
1382 1382
 				}
1383 1383
 
1384 1384
 				// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1385
-				if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) {
1385
+				if (apply_filters('wl_feature__enable__match-terms', false)) {
1386 1386
 					$vocabulary_loader = new Vocabulary_Loader();
1387 1387
 					$vocabulary_loader->init_vocabulary();
1388 1388
 				}
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
 				/**
1391 1391
 				 * Added for feature request 1496 (Webhooks)
1392 1392
 				 */
1393
-				if ( apply_filters( 'wl_feature__enable__webhooks', false ) ) {
1393
+				if (apply_filters('wl_feature__enable__webhooks', false)) {
1394 1394
 					$that->webhook_loader = new Webhooks_Loader();
1395 1395
 					$that->webhook_loader->init();
1396 1396
 				}
@@ -1419,7 +1419,7 @@  discard block
 block discarded – undo
1419 1419
 				 * @since 3.31.5
1420 1420
 				 * Create configuration endpoint for webapp to configure.
1421 1421
 				 */
1422
-				new Config( $that->admin_setup, $that->key_validation_service );
1422
+				new Config($that->admin_setup, $that->key_validation_service);
1423 1423
 				/**
1424 1424
 				 * @since 3.31.7
1425 1425
 				 * Remove duplicate videoobject.
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
 				 * @since 3.32.0
1432 1432
 				 * Create loader for vocabulary terms.
1433 1433
 				 */
1434
-				$vocabulary_terms_loader = new Vocabulary_Terms_Loader( Wordlift_Entity_Type_Service::get_instance(), $property_getter );
1434
+				$vocabulary_terms_loader = new Vocabulary_Terms_Loader(Wordlift_Entity_Type_Service::get_instance(), $property_getter);
1435 1435
 				$vocabulary_terms_loader->init_feature();
1436 1436
 
1437 1437
 				new Entity_Type_Change_Handler(
@@ -1460,9 +1460,9 @@  discard block
 block discarded – undo
1460 1460
 	private function set_locale() {
1461 1461
 
1462 1462
 		$plugin_i18n = new Wordlift_I18n();
1463
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1463
+		$plugin_i18n->set_domain($this->get_plugin_name());
1464 1464
 
1465
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1465
+		$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
1466 1466
 
1467 1467
 	}
1468 1468
 
@@ -1473,7 +1473,7 @@  discard block
 block discarded – undo
1473 1473
 	 * @since    1.0.0
1474 1474
 	 * @access   private
1475 1475
 	 */
1476
-	private function define_admin_hooks( $that ) {
1476
+	private function define_admin_hooks($that) {
1477 1477
 		$plugin_admin = new Wordlift_Admin(
1478 1478
 			$that->get_plugin_name(),
1479 1479
 			$that->get_version(),
@@ -1481,51 +1481,51 @@  discard block
 block discarded – undo
1481 1481
 			$that->user_service
1482 1482
 		);
1483 1483
 
1484
-		$that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1485
-		$that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 );
1484
+		$that->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
1485
+		$that->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11);
1486 1486
 
1487 1487
 		// Hook the `admin_init` function to the Admin Setup.
1488
-		Assertions::is_set( $that->admin_setup, '`admin_setup` must be set' );
1489
-		$that->loader->add_action( 'admin_init', $that->admin_setup, 'admin_init' );
1488
+		Assertions::is_set($that->admin_setup, '`admin_setup` must be set');
1489
+		$that->loader->add_action('admin_init', $that->admin_setup, 'admin_init');
1490 1490
 
1491 1491
 		// Hook the admin_init to the settings page.
1492
-		Assertions::is_set( $that->settings_page, '`setting_page` must be set' );
1493
-		$that->loader->add_action( 'admin_init', $that->settings_page, 'admin_init' );
1492
+		Assertions::is_set($that->settings_page, '`setting_page` must be set');
1493
+		$that->loader->add_action('admin_init', $that->settings_page, 'admin_init');
1494 1494
 
1495 1495
 		// Hook the admin_init to the analytics settings page.
1496
-		Assertions::is_set( $that->analytics_settings_page, '`analytics_setting_page` must be set' );
1497
-		$that->loader->add_action( 'admin_init', $that->analytics_settings_page, 'admin_init' );
1496
+		Assertions::is_set($that->analytics_settings_page, '`analytics_setting_page` must be set');
1497
+		$that->loader->add_action('admin_init', $that->analytics_settings_page, 'admin_init');
1498 1498
 
1499 1499
 		// Hook the init action to taxonomy services.
1500
-		$that->loader->add_action( 'init', $that->topic_taxonomy_service, 'init', 0 );
1501
-		$that->loader->add_action( 'init', $that->entity_types_taxonomy_service, 'init', 0 );
1500
+		$that->loader->add_action('init', $that->topic_taxonomy_service, 'init', 0);
1501
+		$that->loader->add_action('init', $that->entity_types_taxonomy_service, 'init', 0);
1502 1502
 
1503 1503
 		// Hook the AJAX wl_timeline action to the Timeline service.
1504
-		$that->loader->add_action( 'wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1504
+		$that->loader->add_action('wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline');
1505 1505
 
1506 1506
 		// Register custom allowed redirect hosts.
1507
-		$that->loader->add_filter( 'allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts' );
1507
+		$that->loader->add_filter('allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts');
1508 1508
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1509
-		$that->loader->add_action( 'wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect' );
1509
+		$that->loader->add_action('wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect');
1510 1510
 
1511 1511
 		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1512 1512
 		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1513
-		$that->loader->add_action( 'save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 2 );
1514
-		$that->loader->add_action( 'save_post', $that->rating_service, 'set_rating_for', 20, 1 );
1513
+		$that->loader->add_action('save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 2);
1514
+		$that->loader->add_action('save_post', $that->rating_service, 'set_rating_for', 20, 1);
1515 1515
 
1516
-		$that->loader->add_action( 'edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1 );
1517
-		$that->loader->add_action( 'in_admin_header', $that->rating_service, 'in_admin_header' );
1516
+		$that->loader->add_action('edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1);
1517
+		$that->loader->add_action('in_admin_header', $that->rating_service, 'in_admin_header');
1518 1518
 
1519 1519
 		// Entity listing customization (wp-admin/edit.php)
1520 1520
 		// Add custom columns.
1521
-		$that->loader->add_filter( 'manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns' );
1521
+		$that->loader->add_filter('manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns');
1522 1522
 		// no explicit entity as it prevents handling of other post types.
1523
-		$that->loader->add_filter( 'manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2 );
1523
+		$that->loader->add_filter('manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2);
1524 1524
 		// Add 4W selection.
1525
-		$that->loader->add_action( 'restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope' );
1526
-		$that->loader->add_filter( 'posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope' );
1527
-		$that->loader->add_action( 'pre_get_posts', $that->entity_list_service, 'pre_get_posts' );
1528
-		$that->loader->add_action( 'load-edit.php', $that->entity_list_service, 'load_edit' );
1525
+		$that->loader->add_action('restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope');
1526
+		$that->loader->add_filter('posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope');
1527
+		$that->loader->add_action('pre_get_posts', $that->entity_list_service, 'pre_get_posts');
1528
+		$that->loader->add_action('load-edit.php', $that->entity_list_service, 'load_edit');
1529 1529
 
1530 1530
 		/*
1531 1531
 		 * If `All Entity Types` is disable, use the radio button Walker.
@@ -1533,18 +1533,18 @@  discard block
 block discarded – undo
1533 1533
 		 * @see https://github.com/insideout10/wordlift-plugin/issues/835
1534 1534
 		 */
1535 1535
 		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1536
-		if ( ! apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES )
1536
+		if ( ! apply_filters('wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES)
1537 1537
 		     // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1538
-			 && ! apply_filters( 'wl_feature__enable__entity-types-professional', false )
1538
+			 && ! apply_filters('wl_feature__enable__entity-types-professional', false)
1539 1539
 		     // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1540
-			 && ! apply_filters( 'wl_feature__enable__entity-types-business', false )
1540
+			 && ! apply_filters('wl_feature__enable__entity-types-business', false)
1541 1541
 		) {
1542
-			$that->loader->add_filter( 'wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args' );
1542
+			$that->loader->add_filter('wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args');
1543 1543
 		}
1544 1544
 
1545 1545
 		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1546 1546
 		// entities.
1547
-		$that->loader->add_filter( 'prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10 );
1547
+		$that->loader->add_filter('prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10);
1548 1548
 
1549 1549
 		/**
1550 1550
 		 * Filter: wl_feature__enable__settings-download.
@@ -1564,20 +1564,20 @@  discard block
 block discarded – undo
1564 1564
 		);
1565 1565
 
1566 1566
 		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1567
-		$that->loader->add_action( 'wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10 );
1567
+		$that->loader->add_action('wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10);
1568 1568
 
1569 1569
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1570
-		$that->loader->add_action( 'wp_ajax_wl_jsonld', $that->jsonld_service, 'get' );
1571
-		$that->loader->add_action( 'admin_post_wl_jsonld', $that->jsonld_service, 'get' );
1572
-		$that->loader->add_action( 'admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1570
+		$that->loader->add_action('wp_ajax_wl_jsonld', $that->jsonld_service, 'get');
1571
+		$that->loader->add_action('admin_post_wl_jsonld', $that->jsonld_service, 'get');
1572
+		$that->loader->add_action('admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get');
1573 1573
 
1574 1574
 		// Hook the AJAX wl_validate_key action to the Key Validation service.
1575
-		$that->loader->add_action( 'wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key' );
1575
+		$that->loader->add_action('wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key');
1576 1576
 
1577 1577
 		// Hook the AJAX wl_update_country_options action to the countries.
1578
-		$that->loader->add_action( 'wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html' );
1578
+		$that->loader->add_action('wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html');
1579 1579
 
1580
-		$that->loader->add_filter( 'admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction' );
1580
+		$that->loader->add_filter('admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction');
1581 1581
 
1582 1582
 		// Hook the menu creation on the general wordlift menu creation.
1583 1583
 		/**
@@ -1591,16 +1591,16 @@  discard block
 block discarded – undo
1591 1591
 		 * Since 3.30.0 this feature is registered using registry.
1592 1592
 		 */
1593 1593
 		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1594
-		if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) {
1595
-			add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 );
1594
+		if (apply_filters('wl_feature__enable__settings-screen', true) || Admin_User_Option::is_wordlift_admin()) {
1595
+			add_action('wl_admin_menu', array($that->settings_page, 'admin_menu'), 10, 2);
1596 1596
 		}
1597 1597
 
1598 1598
 		// Hook key update.
1599
-		$that->loader->add_action( 'pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2 );
1600
-		$that->loader->add_action( 'update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2 );
1599
+		$that->loader->add_action('pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2);
1600
+		$that->loader->add_action('update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2);
1601 1601
 
1602 1602
 		// Add additional action links to the WordLift plugin in the plugins page.
1603
-		$that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1 );
1603
+		$that->loader->add_filter('plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1);
1604 1604
 
1605 1605
 		/*
1606 1606
 		 * Remove the Analytics Settings link from the plugin page.
@@ -1611,23 +1611,23 @@  discard block
 block discarded – undo
1611 1611
 		// $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->analytics_settings_page_action_link, 'action_links', 10, 1 );
1612 1612
 
1613 1613
 		// Hook the AJAX `wl_publisher` action name.
1614
-		$that->loader->add_action( 'wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher' );
1614
+		$that->loader->add_action('wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher');
1615 1615
 
1616 1616
 		// Hook row actions for the entity type list admin.
1617
-		$that->loader->add_filter( 'wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1617
+		$that->loader->add_filter('wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2);
1618 1618
 
1619 1619
 		/** Ajax actions. */
1620
-		$that->loader->add_action( 'wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export' );
1620
+		$that->loader->add_action('wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export');
1621 1621
 
1622 1622
 		// Hook capabilities manipulation to allow access to entity type admin
1623 1623
 		// page  on WordPress versions before 4.7.
1624 1624
 		global $wp_version;
1625
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1626
-			$that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 2 );
1625
+		if (version_compare($wp_version, '4.7', '<')) {
1626
+			$that->loader->add_filter('map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 2);
1627 1627
 		}
1628 1628
 
1629 1629
 		/** Adapters. */
1630
-		$that->loader->add_filter( 'mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1630
+		$that->loader->add_filter('mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1);
1631 1631
 		/**
1632 1632
 		 * Disabling Faq temporarily.
1633 1633
 		 * Load the tinymce editor button on the tool bar.
@@ -1638,14 +1638,14 @@  discard block
 block discarded – undo
1638 1638
 		// $that->loader->add_filter( 'mce_buttons', $that->faq_tinymce_adapter, 'register_faq_toolbar_button', 10, 1 );
1639 1639
 		// $that->loader->add_filter( 'mce_external_plugins', $that->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 );
1640 1640
 
1641
-		$that->loader->add_action( 'wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create' );
1642
-		$that->loader->add_action( 'wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete' );
1641
+		$that->loader->add_action('wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create');
1642
+		$that->loader->add_action('wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete');
1643 1643
 
1644 1644
 		/**
1645 1645
 		 * @since 3.26.0
1646 1646
 		 */
1647 1647
 		$excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter();
1648
-		$that->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' );
1648
+		$that->loader->add_action('do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box');
1649 1649
 		// Adding Rest route for the post excerpt
1650 1650
 		Post_Excerpt_Rest_Controller::register_routes();
1651 1651
 
@@ -1666,14 +1666,14 @@  discard block
 block discarded – undo
1666 1666
 		);
1667 1667
 
1668 1668
 		// Hooks to restrict multisite super admin from manipulating entity types.
1669
-		if ( is_multisite() ) {
1670
-			$that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 2 );
1669
+		if (is_multisite()) {
1670
+			$that->loader->add_filter('map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 2);
1671 1671
 		}
1672 1672
 
1673 1673
 		$deactivator_feedback = new Wordlift_Deactivator_Feedback();
1674 1674
 
1675
-		add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) );
1676
-		add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) );
1675
+		add_action('admin_footer', array($deactivator_feedback, 'render_feedback_popup'));
1676
+		add_action('admin_enqueue_scripts', array($deactivator_feedback, 'enqueue_popup_scripts'));
1677 1677
 		add_action(
1678 1678
 			'wp_ajax_wl_deactivation_feedback',
1679 1679
 			array(
@@ -1689,13 +1689,13 @@  discard block
 block discarded – undo
1689 1689
 		 */
1690 1690
 		add_filter(
1691 1691
 			'allowed_block_types',
1692
-			function ( $value ) {
1692
+			function($value) {
1693 1693
 
1694
-				if ( true === $value ) {
1694
+				if (true === $value) {
1695 1695
 					return $value;
1696 1696
 				}
1697 1697
 
1698
-				return array_merge( (array) $value, array( 'wordlift/classification' ) );
1698
+				return array_merge((array) $value, array('wordlift/classification'));
1699 1699
 			},
1700 1700
 			PHP_INT_MAX
1701 1701
 		);
@@ -1715,57 +1715,57 @@  discard block
 block discarded – undo
1715 1715
 	 * @since    1.0.0
1716 1716
 	 * @access   private
1717 1717
 	 */
1718
-	private function define_public_hooks( $that ) {
1718
+	private function define_public_hooks($that) {
1719 1719
 
1720
-		$plugin_public = new Wordlift_Public( $that->get_plugin_name(), $that->get_version() );
1720
+		$plugin_public = new Wordlift_Public($that->get_plugin_name(), $that->get_version());
1721 1721
 
1722 1722
 		// Register the entity post type.
1723
-		$that->loader->add_action( 'init', $that->entity_post_type_service, 'register' );
1723
+		$that->loader->add_action('init', $that->entity_post_type_service, 'register');
1724 1724
 
1725 1725
 		// Bind the link generation and handling hooks to the entity link service.
1726
-		$that->loader->add_filter( 'post_type_link', $that->entity_link_service, 'post_type_link', 10, 2 );
1727
-		$that->loader->add_action( 'pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1726
+		$that->loader->add_filter('post_type_link', $that->entity_link_service, 'post_type_link', 10, 2);
1727
+		$that->loader->add_action('pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1);
1728 1728
 
1729
-		$that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1730
-		$that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1731
-		$that->loader->add_action( 'wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts' );
1729
+		$that->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
1730
+		$that->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
1731
+		$that->loader->add_action('wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts');
1732 1732
 
1733 1733
 		// Registering Faq_Content_Filter service used for removing faq question and answer tags from the html.
1734
-		$that->loader->add_filter( 'the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' );
1734
+		$that->loader->add_filter('the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags');
1735 1735
 		// Hook the content filter service to add entity links.
1736
-		if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) {
1736
+		if ( ! defined('WL_DISABLE_CONTENT_FILTER') || ! WL_DISABLE_CONTENT_FILTER) {
1737 1737
 			// We run before other filters.
1738
-			$that->loader->add_filter( 'the_content', $that->content_filter_service, 'the_content', 9 );
1738
+			$that->loader->add_filter('the_content', $that->content_filter_service, 'the_content', 9);
1739 1739
 		}
1740 1740
 
1741 1741
 		// Hook the AJAX wl_timeline action to the Timeline service.
1742
-		$that->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline' );
1742
+		$that->loader->add_action('wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline');
1743 1743
 
1744 1744
 		// Hook the ShareThis service.
1745
-		$that->loader->add_filter( 'the_content', $that->sharethis_service, 'the_content', 99 );
1746
-		$that->loader->add_filter( 'the_excerpt', $that->sharethis_service, 'the_excerpt', 99 );
1745
+		$that->loader->add_filter('the_content', $that->sharethis_service, 'the_content', 99);
1746
+		$that->loader->add_filter('the_excerpt', $that->sharethis_service, 'the_excerpt', 99);
1747 1747
 
1748 1748
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1749
-		$that->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get' );
1749
+		$that->loader->add_action('wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get');
1750 1750
 
1751 1751
 		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1752 1752
 		// in order to tweak WP's `WP_Query` to include entities in queries related
1753 1753
 		// to categories.
1754
-		$that->loader->add_action( 'pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1754
+		$that->loader->add_action('pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1);
1755 1755
 
1756 1756
 		/*
1757 1757
 		 * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service`
1758 1758
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1759 1759
 		 * order of start time.
1760 1760
 		 */
1761
-		$that->loader->add_action( 'pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1 );
1761
+		$that->loader->add_action('pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1);
1762 1762
 
1763 1763
 		// This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done.
1764
-		$that->loader->add_action( 'save_post', $that->entity_type_adapter, 'save_post', 9, 2 );
1764
+		$that->loader->add_action('save_post', $that->entity_type_adapter, 'save_post', 9, 2);
1765 1765
 
1766 1766
 		// Analytics Script Frontend.
1767
-		if ( apply_filters( 'wl_feature__enable__analytics', true ) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable() ) {
1768
-			$that->loader->add_action( 'wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10 );
1767
+		if (apply_filters('wl_feature__enable__analytics', true) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable()) {
1768
+			$that->loader->add_action('wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10);
1769 1769
 		}
1770 1770
 
1771 1771
 	}
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
 		 * @since 3.27.6
1831 1831
 		 */
1832 1832
 		// phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter,WordPress.WP.EnqueuedResourceParameters.MissingVersion
1833
-		wp_register_script( 'wl_enabled_blocks', false );
1833
+		wp_register_script('wl_enabled_blocks', false);
1834 1834
 
1835 1835
 		$enabled_blocks = array();
1836 1836
 
@@ -1840,11 +1840,11 @@  discard block
 block discarded – undo
1840 1840
 		 * @since 3.32.3
1841 1841
 		 */
1842 1842
 		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1843
-		if ( apply_filters( 'wl_feature__enable__product-navigator', true ) ) {
1843
+		if (apply_filters('wl_feature__enable__product-navigator', true)) {
1844 1844
 			$enabled_blocks[] = 'wordlift/products-navigator';
1845 1845
 		}
1846 1846
 
1847
-		if ( apply_filters( 'wl_feature__enable__blocks', true ) ) {
1847
+		if (apply_filters('wl_feature__enable__blocks', true)) {
1848 1848
 			// To intimate JS
1849 1849
 			$enabled_blocks = array_merge(
1850 1850
 				$enabled_blocks,
@@ -1860,8 +1860,8 @@  discard block
 block discarded – undo
1860 1860
 			);
1861 1861
 		}
1862 1862
 
1863
-		wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks );
1864
-		wp_enqueue_script( 'wl_enabled_blocks' );
1863
+		wp_localize_script('wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks);
1864
+		wp_enqueue_script('wl_enabled_blocks');
1865 1865
 	}
1866 1866
 
1867 1867
 	/**
@@ -1870,13 +1870,13 @@  discard block
 block discarded – undo
1870 1870
 	public function register_screens() {
1871 1871
 		// Hook the menu to the Download Your Data page.
1872 1872
 		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
1873
-		if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) {
1874
-			Assertions::is_set( $this->download_your_data_page, "`download_your_data_page` can't be null" );
1875
-			add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 );
1873
+		if (apply_filters('wl_feature__enable__settings-download', true)) {
1874
+			Assertions::is_set($this->download_your_data_page, "`download_your_data_page` can't be null");
1875
+			add_action('admin_menu', array($this->download_your_data_page, 'admin_menu'), 100, 0);
1876 1876
 		}
1877 1877
 
1878
-		Assertions::is_set( $this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null" );
1879
-		add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 );
1878
+		Assertions::is_set($this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null");
1879
+		add_action('admin_menu', array($this->entity_type_settings_admin_page, 'admin_menu'), 100, 0);
1880 1880
 
1881 1881
 	}
1882 1882
 
Please login to merge, or discard this patch.
src/includes/class-wordlift-abstract-post-to-jsonld-converter.php 1 patch
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 *
73 73
 	 * @since 3.10.0
74 74
 	 */
75
-	public function __construct( $entity_type_service, $user_service, $attachment_service, $property_getter ) {
75
+	public function __construct($entity_type_service, $user_service, $attachment_service, $property_getter) {
76 76
 		$this->entity_type_service = $entity_type_service;
77 77
 		$this->user_service        = $user_service;
78 78
 		$this->attachment_service  = $attachment_service;
@@ -91,19 +91,19 @@  discard block
 block discarded – undo
91 91
 	 * @since 3.10.0
92 92
 	 */
93 93
 	// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
94
-	public function convert( $post_id, &$references = array(), &$references_infos = array() ) {
94
+	public function convert($post_id, &$references = array(), &$references_infos = array()) {
95 95
 
96 96
 		// Get the post instance.
97
-		$post = get_post( $post_id );
98
-		if ( null === $post ) {
97
+		$post = get_post($post_id);
98
+		if (null === $post) {
99 99
 			// Post not found.
100 100
 			return null;
101 101
 		}
102 102
 
103 103
 		// Get the post URI @id.
104
-		$id = Wordlift_Entity_Service::get_instance()->get_uri( $post->ID );
105
-		if ( $id === null ) {
106
-			$id = 'get_uri returned null, dataset is ' . wl_configuration_get_redlink_dataset_uri();
104
+		$id = Wordlift_Entity_Service::get_instance()->get_uri($post->ID);
105
+		if ($id === null) {
106
+			$id = 'get_uri returned null, dataset is '.wl_configuration_get_redlink_dataset_uri();
107 107
 		}
108 108
 
109 109
 		/*
@@ -115,8 +115,8 @@  discard block
 block discarded – undo
115 115
 		 */
116 116
 		// Get the entity @type. We consider `post` BlogPostings.
117 117
 		// $type = $this->entity_type_service->get( $post_id );
118
-		$types = $this->entity_type_service->get_names( $post_id );
119
-		$type  = self::make_one( $types );
118
+		$types = $this->entity_type_service->get_names($post_id);
119
+		$type  = self::make_one($types);
120 120
 
121 121
 		// Prepare the response.
122 122
 		$jsonld = array(
@@ -125,8 +125,8 @@  discard block
 block discarded – undo
125 125
 			'@type'    => $type,
126 126
 		);
127 127
 
128
-		if ( post_type_supports( $post->post_type, 'excerpt' ) ) {
129
-			$jsonld['description'] = Wordlift_Post_Excerpt_Helper::get_text_excerpt( $post );
128
+		if (post_type_supports($post->post_type, 'excerpt')) {
129
+			$jsonld['description'] = Wordlift_Post_Excerpt_Helper::get_text_excerpt($post);
130 130
 		}
131 131
 
132 132
 		// Set the `mainEntityOfPage` property if the post has some contents.
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 		 *
137 137
 		 * @since 3.20.0
138 138
 		 */
139
-		$post_content = apply_filters( 'wl_post_content', $post->post_content, $post );
140
-		if ( ! empty( $post_content ) ) {
139
+		$post_content = apply_filters('wl_post_content', $post->post_content, $post);
140
+		if ( ! empty($post_content)) {
141 141
 			// We're setting the `mainEntityOfPage` to signal which one is the
142 142
 			// main entity for the specified URL. It might be however that the
143 143
 			// post/page is actually about another specific entity. How WL deals
@@ -148,28 +148,28 @@  discard block
 block discarded – undo
148 148
 			// No need to specify `'@type' => 'WebPage'.
149 149
 			//
150 150
 			// See https://github.com/insideout10/wordlift-plugin/issues/451.
151
-			$jsonld['mainEntityOfPage'] = get_the_permalink( $post->ID );
151
+			$jsonld['mainEntityOfPage'] = get_the_permalink($post->ID);
152 152
 
153 153
 			/**
154 154
 			 * @see https://github.com/insideout10/wordlift-plugin/issues/1207
155 155
 			 *
156 156
 			 * @since 3.27.7
157 157
 			 */
158
-			if ( in_array( $type, array( 'Occupation', 'OccupationAggregationByEmployer' ), true ) ) {
158
+			if (in_array($type, array('Occupation', 'OccupationAggregationByEmployer'), true)) {
159 159
 				$jsonld['mainEntityOfPage'] = array(
160 160
 					'@type'        => 'WebPage',
161
-					'lastReviewed' => get_post_time( 'Y-m-d\TH:i:sP', true, $post, false ),
161
+					'lastReviewed' => get_post_time('Y-m-d\TH:i:sP', true, $post, false),
162 162
 				);
163 163
 			}
164 164
 		};
165 165
 
166
-		$this->set_images( $this->attachment_service, $post, $jsonld );
166
+		$this->set_images($this->attachment_service, $post, $jsonld);
167 167
 
168 168
 		// Get the entities referenced by this post and set it to the `references`
169 169
 		// array so that the caller can do further processing, such as printing out
170 170
 		// more of those references.
171 171
 		$references_without_locations = Object_Relation_Service::get_instance()
172
-															   ->get_references( $post_id, Object_Type_Enum::POST );
172
+															   ->get_references($post_id, Object_Type_Enum::POST);
173 173
 
174 174
 		/*
175 175
 		 * Add the locations to the references.
@@ -182,33 +182,33 @@  discard block
 block discarded – undo
182 182
 		$entity_type_service = $this->entity_type_service;
183 183
 		$locations           = array_reduce(
184 184
 			$references_without_locations,
185
-			function ( $carry, $reference ) use ( $entity_type_service ) {
185
+			function($carry, $reference) use ($entity_type_service) {
186 186
 				/**
187 187
 				 * @var $reference Reference
188 188
 				 */
189 189
 				// @see https://schema.org/location for the schema.org types using the `location` property.
190
-				if ( ! $entity_type_service->has_entity_type( $reference->get_id(), 'http://schema.org/Action' )
191
-				 && ! $entity_type_service->has_entity_type( $reference->get_id(), 'http://schema.org/Event' )
192
-				 && ! $entity_type_service->has_entity_type( $reference->get_id(), 'http://schema.org/Organization' ) ) {
190
+				if ( ! $entity_type_service->has_entity_type($reference->get_id(), 'http://schema.org/Action')
191
+				 && ! $entity_type_service->has_entity_type($reference->get_id(), 'http://schema.org/Event')
192
+				 && ! $entity_type_service->has_entity_type($reference->get_id(), 'http://schema.org/Organization')) {
193 193
 
194 194
 					return $carry;
195 195
 				}
196
-				$post_location_ids        = get_post_meta( $reference->get_id(), Wordlift_Schema_Service::FIELD_LOCATION );
196
+				$post_location_ids        = get_post_meta($reference->get_id(), Wordlift_Schema_Service::FIELD_LOCATION);
197 197
 				$post_location_references = array_map(
198
-					function ( $post_id ) {
199
-						return new Post_Reference( $post_id );
198
+					function($post_id) {
199
+						return new Post_Reference($post_id);
200 200
 					},
201 201
 					$post_location_ids
202 202
 				);
203 203
 
204
-				return array_merge( $carry, $post_location_references );
204
+				return array_merge($carry, $post_location_references);
205 205
 			},
206 206
 			array()
207 207
 		);
208 208
 
209 209
 		// Merge the references with the referenced locations if any.
210 210
 		// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
211
-		$references = array_merge( $references_without_locations, $locations );
211
+		$references = array_merge($references_without_locations, $locations);
212 212
 
213 213
 		return $jsonld;
214 214
 	}
@@ -222,9 +222,9 @@  discard block
 block discarded – undo
222 222
 	 * @return string The property value without the context.
223 223
 	 * @since 3.10.0
224 224
 	 */
225
-	public function relative_to_context( $value ) {
225
+	public function relative_to_context($value) {
226 226
 
227
-		return 0 === strpos( $value, self::CONTEXT . '/' ) ? substr( $value, strlen( self::CONTEXT ) + 1 ) : $value;
227
+		return 0 === strpos($value, self::CONTEXT.'/') ? substr($value, strlen(self::CONTEXT) + 1) : $value;
228 228
 	}
229 229
 
230 230
 	/**
@@ -239,14 +239,14 @@  discard block
 block discarded – undo
239 239
 	 *
240 240
 	 * @since 3.10.0
241 241
 	 */
242
-	public static function set_images( $attachment_service, $post, &$jsonld ) {
242
+	public static function set_images($attachment_service, $post, &$jsonld) {
243 243
 
244 244
 		// Prepare the attachment ids array.
245 245
 		$ids = array();
246 246
 
247 247
 		// Set the thumbnail id as first attachment id, if any.
248
-		$thumbnail_id = get_post_thumbnail_id( $post->ID );
249
-		if ( '' !== $thumbnail_id && 0 !== $thumbnail_id ) {
248
+		$thumbnail_id = get_post_thumbnail_id($post->ID);
249
+		if ('' !== $thumbnail_id && 0 !== $thumbnail_id) {
250 250
 			$ids[] = $thumbnail_id;
251 251
 		}
252 252
 
@@ -257,34 +257,34 @@  discard block
 block discarded – undo
257 257
 		//
258 258
 		// Get the embeds, removing existing ids.
259 259
 		// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
260
-		if ( apply_filters( 'wl_feature__enable__image-embeds', false ) ) {
261
-			$embeds = array_diff( $attachment_service->get_image_embeds( $post->post_content ), $ids );
260
+		if (apply_filters('wl_feature__enable__image-embeds', false)) {
261
+			$embeds = array_diff($attachment_service->get_image_embeds($post->post_content), $ids);
262 262
 		} else {
263 263
 			$embeds = array();
264 264
 		}
265 265
 
266 266
 		// Get the gallery, removing existing ids.
267
-		$gallery = array_diff( $attachment_service->get_gallery( $post ), $ids, $embeds );
267
+		$gallery = array_diff($attachment_service->get_gallery($post), $ids, $embeds);
268 268
 
269 269
 		// Map the attachment ids to images' data structured for schema.org use.
270 270
 		$images_with_sizes = array_filter(
271 271
 			array_reduce(
272
-				array_merge( $ids, $embeds, $gallery ),
273
-				function ( $carry, $item ) {
272
+				array_merge($ids, $embeds, $gallery),
273
+				function($carry, $item) {
274 274
 					/*
275 275
 					* @todo: we're not sure that we're getting attachment data here, we
276 276
 					* should filter `false`s.
277 277
 					*/
278 278
 
279 279
 					$sources = array_merge(
280
-						Wordlift_Image_Service::get_sources( $item ),
281
-						array( wp_get_attachment_image_src( $item, 'full' ) )
280
+						Wordlift_Image_Service::get_sources($item),
281
+						array(wp_get_attachment_image_src($item, 'full'))
282 282
 					);
283 283
 
284 284
 					$sources_with_image = array_filter(
285 285
 						$sources,
286
-						function ( $source ) {
287
-							return ! empty( $source[0] );
286
+						function($source) {
287
+							return ! empty($source[0]);
288 288
 						}
289 289
 					);
290 290
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 					// or from uploads dir, but the image id still exists as featured image
299 299
 					// or in [gallery] shortcode.
300 300
 					// if ( empty( $attachment[0] ) ) {
301
-					if ( empty( $sources_with_image ) ) {
301
+					if (empty($sources_with_image)) {
302 302
 						return $carry;
303 303
 					}
304 304
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
 		// Refactor data as per schema.org specifications.
318 318
 		$images = array_map(
319
-			function ( $attachment ) {
319
+			function($attachment) {
320 320
 				return Wordlift_Abstract_Post_To_Jsonld_Converter::set_image_size(
321 321
 					array(
322 322
 						'@type' => 'ImageObject',
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 		);
330 330
 
331 331
 		// Add images if present.
332
-		if ( 0 < count( $images ) ) {
332
+		if (0 < count($images)) {
333 333
 			$jsonld['image'] = $images;
334 334
 		}
335 335
 
@@ -347,9 +347,9 @@  discard block
 block discarded – undo
347 347
 	 * @since  3.8.0
348 348
 	 * @access private
349 349
 	 */
350
-	protected static function make_one( $value ) {
350
+	protected static function make_one($value) {
351 351
 
352
-		return 1 === count( $value ) ? $value[0] : $value;
352
+		return 1 === count($value) ? $value[0] : $value;
353 353
 	}
354 354
 
355 355
 	/**
@@ -362,17 +362,17 @@  discard block
 block discarded – undo
362 362
 	 * @return array The enriched `ImageObject` array.
363 363
 	 * @since 3.14.0
364 364
 	 */
365
-	public static function set_image_size( $image, $attachment ) {
365
+	public static function set_image_size($image, $attachment) {
366 366
 
367 367
 		// If you specify a "width" or "height" value you should leave out
368 368
 		// 'px'. For example: "width":"4608px" should be "width":"4608".
369 369
 		//
370 370
 		// See https://github.com/insideout10/wordlift-plugin/issues/451.
371
-		if ( isset( $attachment[1] ) && is_numeric( $attachment[1] ) && 0 < $attachment[1] ) {
371
+		if (isset($attachment[1]) && is_numeric($attachment[1]) && 0 < $attachment[1]) {
372 372
 			$image['width'] = $attachment[1];
373 373
 		}
374 374
 
375
-		if ( isset( $attachment[2] ) && is_numeric( $attachment[2] ) && 0 < $attachment[2] ) {
375
+		if (isset($attachment[2]) && is_numeric($attachment[2]) && 0 < $attachment[2]) {
376 376
 			$image['height'] = $attachment[2];
377 377
 		}
378 378
 
@@ -391,33 +391,33 @@  discard block
 block discarded – undo
391 391
 	 * @since 3.20.0 This code moved from the above function `convert`, used for entity types defined in
392 392
 	 *  the {@link Wordlift_Schema_Service} class.
393 393
 	 */
394
-	protected function process_type_custom_fields( &$jsonld, $fields, $post, &$references, &$references_infos ) {
394
+	protected function process_type_custom_fields(&$jsonld, $fields, $post, &$references, &$references_infos) {
395 395
 
396 396
 		// Set a reference to use in closures.
397 397
 		$converter = $this;
398 398
 
399 399
 		// Try each field on the entity.
400
-		foreach ( $fields as $key => $value ) {
400
+		foreach ($fields as $key => $value) {
401 401
 
402 402
 			// Get the predicate.
403
-			$name = $this->relative_to_context( $value['predicate'] );
403
+			$name = $this->relative_to_context($value['predicate']);
404 404
 
405 405
 			// Get the value, the property service will get the right extractor
406 406
 			// for that property.
407
-			$value = $this->property_getter->get( $post->ID, $key, Object_Type_Enum::POST );
407
+			$value = $this->property_getter->get($post->ID, $key, Object_Type_Enum::POST);
408 408
 
409
-			if ( empty( $value ) ) {
409
+			if (empty($value)) {
410 410
 				continue;
411 411
 			}
412 412
 
413 413
 			// Map the value to the property name.
414 414
 			// If we got an array with just one value, we return that one value.
415 415
 			// If we got a Wordlift_Property_Entity_Reference we get the URL.
416
-			$jsonld[ $name ] = self::make_one(
416
+			$jsonld[$name] = self::make_one(
417 417
 				array_map(
418
-					function ( $item ) use ( $converter, &$references, &$references_infos ) {
418
+					function($item) use ($converter, &$references, &$references_infos) {
419 419
 
420
-						if ( $item instanceof Wordlift_Property_Entity_Reference ) {
420
+						if ($item instanceof Wordlift_Property_Entity_Reference) {
421 421
 
422 422
 							  $url = $item->get_url();
423 423
 
@@ -426,12 +426,12 @@  discard block
 block discarded – undo
426 426
 							  $references[] = $item->to_reference();
427 427
 
428 428
 							// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
429
-							  $references_infos[] = array( 'reference' => $item );
429
+							  $references_infos[] = array('reference' => $item);
430 430
 
431
-							  return array( '@id' => $url );
431
+							  return array('@id' => $url);
432 432
 						}
433 433
 
434
-						return $converter->relative_to_context( $item );
434
+						return $converter->relative_to_context($item);
435 435
 					},
436 436
 					$value
437 437
 				)
Please login to merge, or discard this patch.