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