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