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