Completed
Push — develop ( a6c8bc...e67402 )
by David
07:37
created
src/includes/class-wordlift-sample-data-ajax-adapter.php 2 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -17,58 +17,58 @@
 block discarded – undo
17 17
  */
18 18
 class Wordlift_Sample_Data_Ajax_Adapter {
19 19
 
20
-	/**
21
-	 * The {@link Wordlift_Sample_Data_Service} instance.
22
-	 *
23
-	 * @since  3.12.0
24
-	 * @access private
25
-	 * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
26
-	 */
27
-	private $sample_data_service;
20
+    /**
21
+     * The {@link Wordlift_Sample_Data_Service} instance.
22
+     *
23
+     * @since  3.12.0
24
+     * @access private
25
+     * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
26
+     */
27
+    private $sample_data_service;
28 28
 
29
-	/**
30
-	 * Create a {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
31
-	 *
32
-	 * @since 3.12.0
33
-	 *
34
-	 * @param \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
35
-	 */
36
-	function __construct( $sample_data_service ) {
29
+    /**
30
+     * Create a {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
31
+     *
32
+     * @since 3.12.0
33
+     *
34
+     * @param \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
35
+     */
36
+    function __construct( $sample_data_service ) {
37 37
 
38
-		$this->sample_data_service = $sample_data_service;
38
+        $this->sample_data_service = $sample_data_service;
39 39
 
40
-	}
40
+    }
41 41
 
42
-	/**
43
-	 * Handle the `wl_sample_data_create` ajax action.
44
-	 *
45
-	 * @since 3.12.0
46
-	 */
47
-	function create() {
42
+    /**
43
+     * Handle the `wl_sample_data_create` ajax action.
44
+     *
45
+     * @since 3.12.0
46
+     */
47
+    function create() {
48 48
 
49
-		// Clean any potential garbage before us.
50
-		ob_clean();
49
+        // Clean any potential garbage before us.
50
+        ob_clean();
51 51
 
52
-		// Create the sample data.
53
-		$this->sample_data_service->create();
52
+        // Create the sample data.
53
+        $this->sample_data_service->create();
54 54
 
55
-		// Send success.
56
-		wp_send_json_success();
55
+        // Send success.
56
+        wp_send_json_success();
57 57
 
58
-	}
58
+    }
59 59
 
60
-	function delete() {
60
+    function delete() {
61 61
 
62
-		// Clean any potential garbage before us.
63
-		ob_clean();
62
+        // Clean any potential garbage before us.
63
+        ob_clean();
64 64
 
65
-		// Create the sample data.
66
-		$this->sample_data_service->delete();
65
+        // Create the sample data.
66
+        $this->sample_data_service->delete();
67 67
 
68
-		// Send success.
69
-		@header( 'Content-Disposition: inline' );
70
-		wp_send_json_success();
68
+        // Send success.
69
+        @header( 'Content-Disposition: inline' );
70
+        wp_send_json_success();
71 71
 
72
-	}
72
+    }
73 73
 
74 74
 }
75 75
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 *
34 34
 	 * @param \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
35 35
 	 */
36
-	function __construct( $sample_data_service ) {
36
+	function __construct($sample_data_service) {
37 37
 
38 38
 		$this->sample_data_service = $sample_data_service;
39 39
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 		$this->sample_data_service->delete();
67 67
 
68 68
 		// Send success.
69
-		@header( 'Content-Disposition: inline' );
69
+		@header('Content-Disposition: inline');
70 70
 		wp_send_json_success();
71 71
 
72 72
 	}
Please login to merge, or discard this patch.
src/includes/class-wordlift-sample-data-service.php 2 patches
Indentation   +278 added lines, -278 removed lines patch added patch discarded remove patch
@@ -17,283 +17,283 @@
 block discarded – undo
17 17
  */
18 18
 class Wordlift_Sample_Data_Service {
19 19
 
20
-	/**
21
-	 * An array of sample data.
22
-	 *
23
-	 * @since 3.12.0
24
-	 * @var array $samples An array of sample data.
25
-	 */
26
-	private $samples = array(
27
-		array(
28
-			'post'            => array(
29
-				'post_name'    => 'praesent_imperdiet_odio_sed_lectus_vulputate_finibus',
30
-				'post_title'   => 'Praesent imperdiet odio sed lectus vulputate finibus',
31
-				'post_content' => 'Praesent imperdiet odio sed lectus vulputate finibus. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.',
32
-				'post_type'    => 'entity',
33
-				'post_status'  => 'publish',
34
-			),
35
-			'entity_type_uri' => 'http://schema.org/Event',
36
-		),
37
-		array(
38
-			'post'            => array(
39
-				'post_name'    => 'nullam_tempor_lectus_sit_amet_tincidunt_euismod',
40
-				'post_title'   => 'Nullam tempor lectus sit amet tincidunt euismod',
41
-				'post_content' => 'Nullam tempor lectus sit amet tincidunt euismod. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.',
42
-				'post_type'    => 'entity',
43
-				'post_status'  => 'publish',
44
-			),
45
-			'entity_type_uri' => 'http://schema.org/Place',
46
-		),
47
-		array(
48
-			'post'            => array(
49
-				'post_name'    => 'praesent_luctus_tincidunt_odio_quis_aliquam',
50
-				'post_title'   => 'Praesent luctus tincidunt odio quis aliquam',
51
-				'post_content' => 'Praesent luctus tincidunt odio quis aliquam. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.',
52
-				'post_type'    => 'entity',
53
-				'post_status'  => 'publish',
54
-			),
55
-			'entity_type_uri' => 'http://schema.org/Organization',
56
-		),
57
-		array(
58
-			'post'            => array(
59
-				'post_name'    => 'lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit',
60
-				'post_title'   => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
61
-				'post_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
62
-				'post_type'    => 'entity',
63
-				'post_status'  => 'publish',
64
-			),
65
-			'entity_type_uri' => 'http://schema.org/CreativeWork',
66
-		),
67
-		array(
68
-			'post' =>
69
-				array(
70
-					'post_title'   => 'Praesent imperdiet odio sed lectus vulputate finibus',
71
-					'post_content' => '<span><span id="urn:enhancement-da554278-9522-2d83-76ad-8129d2292cb3" class="textannotation disambiguated wl-event" itemid="{dataset-uri}/entity/praesent_imperdiet_odio_sed_lectus_vulputate_finibus">Praesent imperdiet odio sed lectus vulputate finibus</span>. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.</span>',
72
-					'post_type'    => 'post',
73
-					'post_status'  => 'publish',
74
-				),
75
-		),
76
-		array(
77
-			'post' =>
78
-				array(
79
-					'post_title'   => 'Nullam tempor lectus sit amet tincidunt euismod',
80
-					'post_content' => '<span><span id="urn:local-text-annotation-p8i5o4279ex3rsbwqkrx9z5mh1ox91ae" class="textannotation disambiguated wl-place" itemid="{dataset-uri}/entity/nullam_tempor_lectus_sit_amet_tincidunt_euismod">Nullam tempor lectus sit amet tincidunt euismod</span>. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</span>',
81
-					'post_type'    => 'post',
82
-					'post_status'  => 'publish',
83
-				),
84
-		),
85
-		array(
86
-			'post' =>
87
-				array(
88
-					'post_title'   => 'Praesent luctus tincidunt odio quis aliquam',
89
-					'post_content' => '<span><span id="urn:enhancement-b3487a20-4696-b6d9-6c55-842445f5c263" class="textannotation disambiguated wl-organization" itemid="{dataset-uri}/entity/praesent_luctus_tincidunt_odio_quis_aliquam">Praesent luctus tincidunt odio quis aliquam</span>. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.</span>',
90
-					'post_type'    => 'post',
91
-					'post_status'  => 'publish',
92
-				),
93
-		),
94
-		array(
95
-			'post' =>
96
-				array(
97
-					'post_title'   => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
98
-					'post_content' => '<span><span id="urn:enhancement-4edc3bde-d275-22f9-8d50-0b707596b292" class="textannotation disambiguated wl-thing" itemid="{dataset-uri}/entity/lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit">Lorem ipsum dolor sit amet, consectetur adipiscing elit</span>. Proin rutrum ultrices nulla ut elementum. Nunc nec lacus tortor. Curabitur bibendum imperdiet luctus. Vivamus a faucibus dolor. Donec blandit malesuada risus. Vestibulum volutpat ut tellus sed tincidunt. Sed id tincidunt velit. Integer sed felis id libero fringilla molestie vitae id orci. Ut vel purus ullamcorper, feugiat tortor non, iaculis neque. Vivamus vitae vehicula sem. Mauris fermentum, metus id vestibulum sodales, lorem lacus efficitur ante, non vestibulum ligula ligula a turpis. Vivamus quis scelerisque massa.</span>',
99
-					'post_type'    => 'post',
100
-					'post_status'  => 'publish',
101
-				),
102
-		),
103
-		array(
104
-			'post' => array(
105
-				'post_title'   => 'Lorem ipsum',
106
-				'post_content' => '<span id="urn:enhancement-28cb4112-64cf-bd49-ef97-a2ee54727de7" class="textannotation disambiguated wl-thing" itemid="{dataset-uri}/entity/lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit">Lorem ipsum</span> dolor sit amet, consectetur adipiscing elit. Proin rutrum ultrices nulla ut elementum. Nunc nec lacus tortor. Curabitur bibendum imperdiet luctus. Vivamus a faucibus dolor. Donec blandit malesuada risus. Vestibulum volutpat ut tellus sed tincidunt. Sed id tincidunt velit. Integer sed felis id libero fringilla molestie vitae id orci. Ut vel purus ullamcorper, feugiat tortor non, iaculis neque. Vivamus vitae vehicula sem. Mauris fermentum, metus id vestibulum sodales, lorem lacus efficitur ante, non vestibulum ligula ligula a turpis. Vivamus quis scelerisque massa.' .
107
-				                  "\n\n[wl_navigator]\n\n" .
108
-				                  '<span id="urn:local-text-annotation-p4pre3y4tccnq00prifn6lzkowgcw6ip" class="textannotation disambiguated wl-organization" itemid="{dataset-uri}/entity/praesent_luctus_tincidunt_odio_quis_aliquam">Praesent luctus tincidunt odio quis aliquam</span>. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.' .
109
-				                  "\n\n[wl_navigator]\n\n" .
110
-				                  '<span id="urn:local-text-annotation-th789do93h8xdgz7zquk7c6qxy4kx0jk" class="textannotation disambiguated wl-place" itemid="{dataset-uri}/entity/nullam_tempor_lectus_sit_amet_tincidunt_euismod">Nullam tempor lectus sit amet tincidunt euismod</span>. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.' .
111
-				                  "\n\n[wl_navigator]\n\n" .
112
-				                  '<span id="urn:local-text-annotation-v0kqdtx685n6cg9jrfvl67amkhm28hxh" class="textannotation disambiguated wl-event" itemid="{dataset-uri}/entity/praesent_imperdiet_odio_sed_lectus_vulputate_finibus">Praesent imperdiet odio sed lectus vulputate finibus</span>. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.',
113
-				'post_type'    => 'post',
114
-				'post_status'  => 'publish',
115
-			),
116
-		),
117
-	);
118
-
119
-	/**
120
-	 * The {@link Wordlift_Entity_Type_Service} instance.
121
-	 *
122
-	 * @since  3.12.0
123
-	 * @access private
124
-	 * @var \Wordlift_Entity_Type_Service $entity_type_service The {@link Wordlift_Entity_Type_Service} instance.
125
-	 */
126
-	private $entity_type_service;
127
-
128
-	/**
129
-	 * The {@link Wordlift_Configuration_Service} instance.
130
-	 *
131
-	 * @since  3.12.0
132
-	 * @access private
133
-	 * @var \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
134
-	 */
135
-	private $configuration_service;
136
-
137
-	/**
138
-	 * Create a {@link Wordlift_Sample_Data_Service} instance.
139
-	 *
140
-	 * @since 3.12.0
141
-	 *
142
-	 * @param \Wordlift_Entity_Type_Service   $entity_type_service   The {@link Wordlift_Entity_Type_Service} instance.
143
-	 * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
144
-	 */
145
-	function __construct( $entity_type_service, $configuration_service ) {
146
-
147
-		$this->entity_type_service   = $entity_type_service;
148
-		$this->configuration_service = $configuration_service;
149
-	}
150
-
151
-	/**
152
-	 * Create sample data in this WordPress instance.
153
-	 *
154
-	 * @since 3.12.0
155
-	 */
156
-	function create() {
157
-
158
-		// Get the source image path.
159
-		$source = plugin_dir_path( dirname( __FILE__ ) ) . 'images/rome.png';
160
-
161
-		// Create an attachment with the local file.
162
-		$attachment_id = $this->create_attachment_from_local_file( $source );
163
-
164
-		// Add a flag to signal the attachment is sample data and allow easy delete
165
-		// afterwards.
166
-		add_post_meta( $attachment_id, '_wl_sample_data', 1, true );
167
-
168
-		// Get the dataset URI, used for replacements in the `post_content`.
169
-		$dataset_uri = $this->configuration_service->get_dataset_uri();
170
-
171
-		// Create 4 entities.
172
-		// Create 4 posts referencing each one entity.
173
-		// Create 1 post referencing all the entities.
174
-		foreach ( $this->samples as $sample ) {
175
-
176
-			// Get the post data.
177
-			$post = array_replace_recursive( $sample['post'], array( 'post_content' => str_replace( '{dataset-uri}', $dataset_uri, $sample['post']['post_content'] ) ) );
178
-
179
-			// Insert the post.
180
-			$post_id = wp_insert_post( $post );
181
-
182
-			// Add a flag to signal the post is sample data and allow easy delete
183
-			// afterwards.
184
-			add_post_meta( $post_id, '_wl_sample_data', 1, true );
185
-
186
-			// Set the psot thumbnail.
187
-			set_post_thumbnail( $post_id, $attachment_id );
188
-
189
-			// If the `entity_type_uri` property is set, set it on the post.
190
-			if ( isset( $sample['entity_type_uri'] ) ) {
191
-				$this->entity_type_service->set( $post_id, $sample['entity_type_uri'] );
192
-			}
193
-
194
-		}
195
-
196
-
197
-	}
198
-
199
-	/**
200
-	 * Remove the sample data from this WordPress instance.
201
-	 *
202
-	 * @since 3.12.0
203
-	 */
204
-	function delete() {
205
-
206
-		$this->delete_by_type( 'post' );
207
-		$this->delete_by_type( 'entity' );
208
-		$this->delete_by_type( 'attachment' );
209
-
210
-	}
211
-
212
-	/**
213
-	 * Remove the sample data of the specified type (e.g. `post`, `entity`, `attachment`)
214
-	 * from the local WordPress instance.
215
-	 *
216
-	 * @since 3.12.0
217
-	 *
218
-	 * @param string $type WordPress {@link WP_Post}'s type, e.g. `post`, `entity`, `attachment`.
219
-	 */
220
-	private function delete_by_type( $type ) {
221
-
222
-		$posts = get_posts( array(
223
-			'meta_key'    => '_wl_sample_data',
224
-			'meta_value'  => 1,
225
-			'post_status' => 'any',
226
-			'post_type'   => $type,
227
-		) );
228
-
229
-		foreach ( $posts as $post ) {
230
-			wp_delete_post( $post->ID, true );
231
-		}
232
-
233
-	}
234
-
235
-	/**
236
-	 * Create a WordPress' attachment using the specified file.
237
-	 *
238
-	 * @since 3.12.0
239
-	 *
240
-	 * @param string $source The source file path.
241
-	 *
242
-	 * @return int WordPress' attachment's id.
243
-	 */
244
-	private function create_attachment_from_local_file( $source ) {
245
-
246
-		// Get the path to the upload directory.
247
-		$upload_dir  = wp_upload_dir();
248
-		$upload_path = $upload_dir['path'];
249
-
250
-		// Get the destination image path.
251
-		$destination = $upload_path . '/wl-sample-data.png';
252
-
253
-		// Copy the source file to the destination.
254
-		@copy( $source, $destination );
255
-
256
-		return $this->create_attachment( $destination );
257
-	}
258
-
259
-	/**
260
-	 * Create a WordPress attachment using the specified file in the upload folder.
261
-	 *
262
-	 * @see   https://codex.wordpress.org/Function_Reference/wp_insert_attachment
263
-	 *
264
-	 * @since 3.12.0
265
-	 *
266
-	 * @param string $filename The image filename.
267
-	 *
268
-	 * @return int The attachment id.
269
-	 */
270
-	private function create_attachment( $filename ) {
271
-
272
-		// Check the type of file. We'll use this as the 'post_mime_type'.
273
-		$filetype = wp_check_filetype( basename( $filename ), null );
274
-
275
-		// Get the path to the upload directory.
276
-		$wp_upload_dir = wp_upload_dir();
277
-
278
-		// Prepare an array of post data for the attachment.
279
-		$attachment = array(
280
-			'guid'           => $wp_upload_dir['url'] . '/' . basename( $filename ),
281
-			'post_mime_type' => $filetype['type'],
282
-			'post_title'     => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
283
-			'post_content'   => '',
284
-			'post_status'    => 'inherit',
285
-		);
286
-
287
-		// Insert the attachment.
288
-		$attachment_id = wp_insert_attachment( $attachment, $filename );
289
-
290
-		// Generate the metadata for the attachment, and update the database record.
291
-		$attachment_data = wp_generate_attachment_metadata( $attachment_id, $filename );
292
-
293
-		// Update the attachment metadata.
294
-		wp_update_attachment_metadata( $attachment_id, $attachment_data );
295
-
296
-		return $attachment_id;
297
-	}
20
+    /**
21
+     * An array of sample data.
22
+     *
23
+     * @since 3.12.0
24
+     * @var array $samples An array of sample data.
25
+     */
26
+    private $samples = array(
27
+        array(
28
+            'post'            => array(
29
+                'post_name'    => 'praesent_imperdiet_odio_sed_lectus_vulputate_finibus',
30
+                'post_title'   => 'Praesent imperdiet odio sed lectus vulputate finibus',
31
+                'post_content' => 'Praesent imperdiet odio sed lectus vulputate finibus. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.',
32
+                'post_type'    => 'entity',
33
+                'post_status'  => 'publish',
34
+            ),
35
+            'entity_type_uri' => 'http://schema.org/Event',
36
+        ),
37
+        array(
38
+            'post'            => array(
39
+                'post_name'    => 'nullam_tempor_lectus_sit_amet_tincidunt_euismod',
40
+                'post_title'   => 'Nullam tempor lectus sit amet tincidunt euismod',
41
+                'post_content' => 'Nullam tempor lectus sit amet tincidunt euismod. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.',
42
+                'post_type'    => 'entity',
43
+                'post_status'  => 'publish',
44
+            ),
45
+            'entity_type_uri' => 'http://schema.org/Place',
46
+        ),
47
+        array(
48
+            'post'            => array(
49
+                'post_name'    => 'praesent_luctus_tincidunt_odio_quis_aliquam',
50
+                'post_title'   => 'Praesent luctus tincidunt odio quis aliquam',
51
+                'post_content' => 'Praesent luctus tincidunt odio quis aliquam. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.',
52
+                'post_type'    => 'entity',
53
+                'post_status'  => 'publish',
54
+            ),
55
+            'entity_type_uri' => 'http://schema.org/Organization',
56
+        ),
57
+        array(
58
+            'post'            => array(
59
+                'post_name'    => 'lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit',
60
+                'post_title'   => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
61
+                'post_content' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.',
62
+                'post_type'    => 'entity',
63
+                'post_status'  => 'publish',
64
+            ),
65
+            'entity_type_uri' => 'http://schema.org/CreativeWork',
66
+        ),
67
+        array(
68
+            'post' =>
69
+                array(
70
+                    'post_title'   => 'Praesent imperdiet odio sed lectus vulputate finibus',
71
+                    'post_content' => '<span><span id="urn:enhancement-da554278-9522-2d83-76ad-8129d2292cb3" class="textannotation disambiguated wl-event" itemid="{dataset-uri}/entity/praesent_imperdiet_odio_sed_lectus_vulputate_finibus">Praesent imperdiet odio sed lectus vulputate finibus</span>. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.</span>',
72
+                    'post_type'    => 'post',
73
+                    'post_status'  => 'publish',
74
+                ),
75
+        ),
76
+        array(
77
+            'post' =>
78
+                array(
79
+                    'post_title'   => 'Nullam tempor lectus sit amet tincidunt euismod',
80
+                    'post_content' => '<span><span id="urn:local-text-annotation-p8i5o4279ex3rsbwqkrx9z5mh1ox91ae" class="textannotation disambiguated wl-place" itemid="{dataset-uri}/entity/nullam_tempor_lectus_sit_amet_tincidunt_euismod">Nullam tempor lectus sit amet tincidunt euismod</span>. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.</span>',
81
+                    'post_type'    => 'post',
82
+                    'post_status'  => 'publish',
83
+                ),
84
+        ),
85
+        array(
86
+            'post' =>
87
+                array(
88
+                    'post_title'   => 'Praesent luctus tincidunt odio quis aliquam',
89
+                    'post_content' => '<span><span id="urn:enhancement-b3487a20-4696-b6d9-6c55-842445f5c263" class="textannotation disambiguated wl-organization" itemid="{dataset-uri}/entity/praesent_luctus_tincidunt_odio_quis_aliquam">Praesent luctus tincidunt odio quis aliquam</span>. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.</span>',
90
+                    'post_type'    => 'post',
91
+                    'post_status'  => 'publish',
92
+                ),
93
+        ),
94
+        array(
95
+            'post' =>
96
+                array(
97
+                    'post_title'   => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit',
98
+                    'post_content' => '<span><span id="urn:enhancement-4edc3bde-d275-22f9-8d50-0b707596b292" class="textannotation disambiguated wl-thing" itemid="{dataset-uri}/entity/lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit">Lorem ipsum dolor sit amet, consectetur adipiscing elit</span>. Proin rutrum ultrices nulla ut elementum. Nunc nec lacus tortor. Curabitur bibendum imperdiet luctus. Vivamus a faucibus dolor. Donec blandit malesuada risus. Vestibulum volutpat ut tellus sed tincidunt. Sed id tincidunt velit. Integer sed felis id libero fringilla molestie vitae id orci. Ut vel purus ullamcorper, feugiat tortor non, iaculis neque. Vivamus vitae vehicula sem. Mauris fermentum, metus id vestibulum sodales, lorem lacus efficitur ante, non vestibulum ligula ligula a turpis. Vivamus quis scelerisque massa.</span>',
99
+                    'post_type'    => 'post',
100
+                    'post_status'  => 'publish',
101
+                ),
102
+        ),
103
+        array(
104
+            'post' => array(
105
+                'post_title'   => 'Lorem ipsum',
106
+                'post_content' => '<span id="urn:enhancement-28cb4112-64cf-bd49-ef97-a2ee54727de7" class="textannotation disambiguated wl-thing" itemid="{dataset-uri}/entity/lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit">Lorem ipsum</span> dolor sit amet, consectetur adipiscing elit. Proin rutrum ultrices nulla ut elementum. Nunc nec lacus tortor. Curabitur bibendum imperdiet luctus. Vivamus a faucibus dolor. Donec blandit malesuada risus. Vestibulum volutpat ut tellus sed tincidunt. Sed id tincidunt velit. Integer sed felis id libero fringilla molestie vitae id orci. Ut vel purus ullamcorper, feugiat tortor non, iaculis neque. Vivamus vitae vehicula sem. Mauris fermentum, metus id vestibulum sodales, lorem lacus efficitur ante, non vestibulum ligula ligula a turpis. Vivamus quis scelerisque massa.' .
107
+                                    "\n\n[wl_navigator]\n\n" .
108
+                                    '<span id="urn:local-text-annotation-p4pre3y4tccnq00prifn6lzkowgcw6ip" class="textannotation disambiguated wl-organization" itemid="{dataset-uri}/entity/praesent_luctus_tincidunt_odio_quis_aliquam">Praesent luctus tincidunt odio quis aliquam</span>. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.' .
109
+                                    "\n\n[wl_navigator]\n\n" .
110
+                                    '<span id="urn:local-text-annotation-th789do93h8xdgz7zquk7c6qxy4kx0jk" class="textannotation disambiguated wl-place" itemid="{dataset-uri}/entity/nullam_tempor_lectus_sit_amet_tincidunt_euismod">Nullam tempor lectus sit amet tincidunt euismod</span>. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.' .
111
+                                    "\n\n[wl_navigator]\n\n" .
112
+                                    '<span id="urn:local-text-annotation-v0kqdtx685n6cg9jrfvl67amkhm28hxh" class="textannotation disambiguated wl-event" itemid="{dataset-uri}/entity/praesent_imperdiet_odio_sed_lectus_vulputate_finibus">Praesent imperdiet odio sed lectus vulputate finibus</span>. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.',
113
+                'post_type'    => 'post',
114
+                'post_status'  => 'publish',
115
+            ),
116
+        ),
117
+    );
118
+
119
+    /**
120
+     * The {@link Wordlift_Entity_Type_Service} instance.
121
+     *
122
+     * @since  3.12.0
123
+     * @access private
124
+     * @var \Wordlift_Entity_Type_Service $entity_type_service The {@link Wordlift_Entity_Type_Service} instance.
125
+     */
126
+    private $entity_type_service;
127
+
128
+    /**
129
+     * The {@link Wordlift_Configuration_Service} instance.
130
+     *
131
+     * @since  3.12.0
132
+     * @access private
133
+     * @var \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
134
+     */
135
+    private $configuration_service;
136
+
137
+    /**
138
+     * Create a {@link Wordlift_Sample_Data_Service} instance.
139
+     *
140
+     * @since 3.12.0
141
+     *
142
+     * @param \Wordlift_Entity_Type_Service   $entity_type_service   The {@link Wordlift_Entity_Type_Service} instance.
143
+     * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
144
+     */
145
+    function __construct( $entity_type_service, $configuration_service ) {
146
+
147
+        $this->entity_type_service   = $entity_type_service;
148
+        $this->configuration_service = $configuration_service;
149
+    }
150
+
151
+    /**
152
+     * Create sample data in this WordPress instance.
153
+     *
154
+     * @since 3.12.0
155
+     */
156
+    function create() {
157
+
158
+        // Get the source image path.
159
+        $source = plugin_dir_path( dirname( __FILE__ ) ) . 'images/rome.png';
160
+
161
+        // Create an attachment with the local file.
162
+        $attachment_id = $this->create_attachment_from_local_file( $source );
163
+
164
+        // Add a flag to signal the attachment is sample data and allow easy delete
165
+        // afterwards.
166
+        add_post_meta( $attachment_id, '_wl_sample_data', 1, true );
167
+
168
+        // Get the dataset URI, used for replacements in the `post_content`.
169
+        $dataset_uri = $this->configuration_service->get_dataset_uri();
170
+
171
+        // Create 4 entities.
172
+        // Create 4 posts referencing each one entity.
173
+        // Create 1 post referencing all the entities.
174
+        foreach ( $this->samples as $sample ) {
175
+
176
+            // Get the post data.
177
+            $post = array_replace_recursive( $sample['post'], array( 'post_content' => str_replace( '{dataset-uri}', $dataset_uri, $sample['post']['post_content'] ) ) );
178
+
179
+            // Insert the post.
180
+            $post_id = wp_insert_post( $post );
181
+
182
+            // Add a flag to signal the post is sample data and allow easy delete
183
+            // afterwards.
184
+            add_post_meta( $post_id, '_wl_sample_data', 1, true );
185
+
186
+            // Set the psot thumbnail.
187
+            set_post_thumbnail( $post_id, $attachment_id );
188
+
189
+            // If the `entity_type_uri` property is set, set it on the post.
190
+            if ( isset( $sample['entity_type_uri'] ) ) {
191
+                $this->entity_type_service->set( $post_id, $sample['entity_type_uri'] );
192
+            }
193
+
194
+        }
195
+
196
+
197
+    }
198
+
199
+    /**
200
+     * Remove the sample data from this WordPress instance.
201
+     *
202
+     * @since 3.12.0
203
+     */
204
+    function delete() {
205
+
206
+        $this->delete_by_type( 'post' );
207
+        $this->delete_by_type( 'entity' );
208
+        $this->delete_by_type( 'attachment' );
209
+
210
+    }
211
+
212
+    /**
213
+     * Remove the sample data of the specified type (e.g. `post`, `entity`, `attachment`)
214
+     * from the local WordPress instance.
215
+     *
216
+     * @since 3.12.0
217
+     *
218
+     * @param string $type WordPress {@link WP_Post}'s type, e.g. `post`, `entity`, `attachment`.
219
+     */
220
+    private function delete_by_type( $type ) {
221
+
222
+        $posts = get_posts( array(
223
+            'meta_key'    => '_wl_sample_data',
224
+            'meta_value'  => 1,
225
+            'post_status' => 'any',
226
+            'post_type'   => $type,
227
+        ) );
228
+
229
+        foreach ( $posts as $post ) {
230
+            wp_delete_post( $post->ID, true );
231
+        }
232
+
233
+    }
234
+
235
+    /**
236
+     * Create a WordPress' attachment using the specified file.
237
+     *
238
+     * @since 3.12.0
239
+     *
240
+     * @param string $source The source file path.
241
+     *
242
+     * @return int WordPress' attachment's id.
243
+     */
244
+    private function create_attachment_from_local_file( $source ) {
245
+
246
+        // Get the path to the upload directory.
247
+        $upload_dir  = wp_upload_dir();
248
+        $upload_path = $upload_dir['path'];
249
+
250
+        // Get the destination image path.
251
+        $destination = $upload_path . '/wl-sample-data.png';
252
+
253
+        // Copy the source file to the destination.
254
+        @copy( $source, $destination );
255
+
256
+        return $this->create_attachment( $destination );
257
+    }
258
+
259
+    /**
260
+     * Create a WordPress attachment using the specified file in the upload folder.
261
+     *
262
+     * @see   https://codex.wordpress.org/Function_Reference/wp_insert_attachment
263
+     *
264
+     * @since 3.12.0
265
+     *
266
+     * @param string $filename The image filename.
267
+     *
268
+     * @return int The attachment id.
269
+     */
270
+    private function create_attachment( $filename ) {
271
+
272
+        // Check the type of file. We'll use this as the 'post_mime_type'.
273
+        $filetype = wp_check_filetype( basename( $filename ), null );
274
+
275
+        // Get the path to the upload directory.
276
+        $wp_upload_dir = wp_upload_dir();
277
+
278
+        // Prepare an array of post data for the attachment.
279
+        $attachment = array(
280
+            'guid'           => $wp_upload_dir['url'] . '/' . basename( $filename ),
281
+            'post_mime_type' => $filetype['type'],
282
+            'post_title'     => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
283
+            'post_content'   => '',
284
+            'post_status'    => 'inherit',
285
+        );
286
+
287
+        // Insert the attachment.
288
+        $attachment_id = wp_insert_attachment( $attachment, $filename );
289
+
290
+        // Generate the metadata for the attachment, and update the database record.
291
+        $attachment_data = wp_generate_attachment_metadata( $attachment_id, $filename );
292
+
293
+        // Update the attachment metadata.
294
+        wp_update_attachment_metadata( $attachment_id, $attachment_data );
295
+
296
+        return $attachment_id;
297
+    }
298 298
 
299 299
 }
Please login to merge, or discard this patch.
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@  discard block
 block discarded – undo
103 103
 		array(
104 104
 			'post' => array(
105 105
 				'post_title'   => 'Lorem ipsum',
106
-				'post_content' => '<span id="urn:enhancement-28cb4112-64cf-bd49-ef97-a2ee54727de7" class="textannotation disambiguated wl-thing" itemid="{dataset-uri}/entity/lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit">Lorem ipsum</span> dolor sit amet, consectetur adipiscing elit. Proin rutrum ultrices nulla ut elementum. Nunc nec lacus tortor. Curabitur bibendum imperdiet luctus. Vivamus a faucibus dolor. Donec blandit malesuada risus. Vestibulum volutpat ut tellus sed tincidunt. Sed id tincidunt velit. Integer sed felis id libero fringilla molestie vitae id orci. Ut vel purus ullamcorper, feugiat tortor non, iaculis neque. Vivamus vitae vehicula sem. Mauris fermentum, metus id vestibulum sodales, lorem lacus efficitur ante, non vestibulum ligula ligula a turpis. Vivamus quis scelerisque massa.' .
107
-				                  "\n\n[wl_navigator]\n\n" .
108
-				                  '<span id="urn:local-text-annotation-p4pre3y4tccnq00prifn6lzkowgcw6ip" class="textannotation disambiguated wl-organization" itemid="{dataset-uri}/entity/praesent_luctus_tincidunt_odio_quis_aliquam">Praesent luctus tincidunt odio quis aliquam</span>. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.' .
109
-				                  "\n\n[wl_navigator]\n\n" .
110
-				                  '<span id="urn:local-text-annotation-th789do93h8xdgz7zquk7c6qxy4kx0jk" class="textannotation disambiguated wl-place" itemid="{dataset-uri}/entity/nullam_tempor_lectus_sit_amet_tincidunt_euismod">Nullam tempor lectus sit amet tincidunt euismod</span>. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.' .
111
-				                  "\n\n[wl_navigator]\n\n" .
106
+				'post_content' => '<span id="urn:enhancement-28cb4112-64cf-bd49-ef97-a2ee54727de7" class="textannotation disambiguated wl-thing" itemid="{dataset-uri}/entity/lorem_ipsum_dolor_sit_amet__consectetur_adipiscing_elit">Lorem ipsum</span> dolor sit amet, consectetur adipiscing elit. Proin rutrum ultrices nulla ut elementum. Nunc nec lacus tortor. Curabitur bibendum imperdiet luctus. Vivamus a faucibus dolor. Donec blandit malesuada risus. Vestibulum volutpat ut tellus sed tincidunt. Sed id tincidunt velit. Integer sed felis id libero fringilla molestie vitae id orci. Ut vel purus ullamcorper, feugiat tortor non, iaculis neque. Vivamus vitae vehicula sem. Mauris fermentum, metus id vestibulum sodales, lorem lacus efficitur ante, non vestibulum ligula ligula a turpis. Vivamus quis scelerisque massa.'.
107
+				                  "\n\n[wl_navigator]\n\n".
108
+				                  '<span id="urn:local-text-annotation-p4pre3y4tccnq00prifn6lzkowgcw6ip" class="textannotation disambiguated wl-organization" itemid="{dataset-uri}/entity/praesent_luctus_tincidunt_odio_quis_aliquam">Praesent luctus tincidunt odio quis aliquam</span>. Ut pellentesque odio nec turpis placerat, at rhoncus mauris elementum. Proin vehicula lectus a dolor bibendum, ut pretium lacus volutpat. Integer luctus enim sed odio dapibus tempus. Fusce elementum purus in diam dictum, sit amet ultricies leo molestie. Etiam id nunc tincidunt sapien tristique interdum ac at purus. Nulla eget laoreet turpis. Nullam id cursus nulla.'.
109
+				                  "\n\n[wl_navigator]\n\n".
110
+				                  '<span id="urn:local-text-annotation-th789do93h8xdgz7zquk7c6qxy4kx0jk" class="textannotation disambiguated wl-place" itemid="{dataset-uri}/entity/nullam_tempor_lectus_sit_amet_tincidunt_euismod">Nullam tempor lectus sit amet tincidunt euismod</span>. Nunc posuere libero augue, eu pretium erat interdum id. Vivamus aliquam dui in mauris tempor, vitae vestibulum odio aliquet. Proin quis bibendum diam, nec tempus dui. Pellentesque sit amet justo vitae urna ornare volutpat quis consectetur nisl. Sed hendrerit purus et magna varius, sodales tincidunt velit finibus. Donec malesuada faucibus mattis. Morbi viverra sagittis justo nec luctus. Nullam et justo sed nisi fringilla rutrum sit amet a urna. Integer elementum, risus in condimentum rhoncus, nisi velit cursus tellus, sed sagittis ante tellus hendrerit ante. Donec et semper libero, vitae imperdiet ligula. Donec eleifend iaculis nisi sed mollis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin faucibus magna ac lectus tempor iaculis quis in nisi. Mauris ac nibh lacinia, ultrices erat quis, rhoncus lectus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.'.
111
+				                  "\n\n[wl_navigator]\n\n".
112 112
 				                  '<span id="urn:local-text-annotation-v0kqdtx685n6cg9jrfvl67amkhm28hxh" class="textannotation disambiguated wl-event" itemid="{dataset-uri}/entity/praesent_imperdiet_odio_sed_lectus_vulputate_finibus">Praesent imperdiet odio sed lectus vulputate finibus</span>. Donec placerat ex arcu, eget fermentum metus ullamcorper vitae. Cras interdum libero a tellus sagittis, sed ultricies sapien tincidunt. Aliquam sit amet vehicula sem. Mauris neque nisl, pellentesque ut molestie id, laoreet nec tortor. Sed tempus ornare est, nec dapibus enim ornare eu. Cras risus ligula, blandit ut faucibus ut, vulputate id ipsum. In vel purus at orci hendrerit cursus. Aliquam interdum lorem id dui maximus volutpat. Vestibulum mi velit, efficitur nec neque eu, posuere porta risus.',
113 113
 				'post_type'    => 'post',
114 114
 				'post_status'  => 'publish',
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 	 * @param \Wordlift_Entity_Type_Service   $entity_type_service   The {@link Wordlift_Entity_Type_Service} instance.
143 143
 	 * @param \Wordlift_Configuration_Service $configuration_service The {@link Wordlift_Configuration_Service} instance.
144 144
 	 */
145
-	function __construct( $entity_type_service, $configuration_service ) {
145
+	function __construct($entity_type_service, $configuration_service) {
146 146
 
147 147
 		$this->entity_type_service   = $entity_type_service;
148 148
 		$this->configuration_service = $configuration_service;
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
 	function create() {
157 157
 
158 158
 		// Get the source image path.
159
-		$source = plugin_dir_path( dirname( __FILE__ ) ) . 'images/rome.png';
159
+		$source = plugin_dir_path(dirname(__FILE__)).'images/rome.png';
160 160
 
161 161
 		// Create an attachment with the local file.
162
-		$attachment_id = $this->create_attachment_from_local_file( $source );
162
+		$attachment_id = $this->create_attachment_from_local_file($source);
163 163
 
164 164
 		// Add a flag to signal the attachment is sample data and allow easy delete
165 165
 		// afterwards.
166
-		add_post_meta( $attachment_id, '_wl_sample_data', 1, true );
166
+		add_post_meta($attachment_id, '_wl_sample_data', 1, true);
167 167
 
168 168
 		// Get the dataset URI, used for replacements in the `post_content`.
169 169
 		$dataset_uri = $this->configuration_service->get_dataset_uri();
@@ -171,24 +171,24 @@  discard block
 block discarded – undo
171 171
 		// Create 4 entities.
172 172
 		// Create 4 posts referencing each one entity.
173 173
 		// Create 1 post referencing all the entities.
174
-		foreach ( $this->samples as $sample ) {
174
+		foreach ($this->samples as $sample) {
175 175
 
176 176
 			// Get the post data.
177
-			$post = array_replace_recursive( $sample['post'], array( 'post_content' => str_replace( '{dataset-uri}', $dataset_uri, $sample['post']['post_content'] ) ) );
177
+			$post = array_replace_recursive($sample['post'], array('post_content' => str_replace('{dataset-uri}', $dataset_uri, $sample['post']['post_content'])));
178 178
 
179 179
 			// Insert the post.
180
-			$post_id = wp_insert_post( $post );
180
+			$post_id = wp_insert_post($post);
181 181
 
182 182
 			// Add a flag to signal the post is sample data and allow easy delete
183 183
 			// afterwards.
184
-			add_post_meta( $post_id, '_wl_sample_data', 1, true );
184
+			add_post_meta($post_id, '_wl_sample_data', 1, true);
185 185
 
186 186
 			// Set the psot thumbnail.
187
-			set_post_thumbnail( $post_id, $attachment_id );
187
+			set_post_thumbnail($post_id, $attachment_id);
188 188
 
189 189
 			// If the `entity_type_uri` property is set, set it on the post.
190
-			if ( isset( $sample['entity_type_uri'] ) ) {
191
-				$this->entity_type_service->set( $post_id, $sample['entity_type_uri'] );
190
+			if (isset($sample['entity_type_uri'])) {
191
+				$this->entity_type_service->set($post_id, $sample['entity_type_uri']);
192 192
 			}
193 193
 
194 194
 		}
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 	 */
204 204
 	function delete() {
205 205
 
206
-		$this->delete_by_type( 'post' );
207
-		$this->delete_by_type( 'entity' );
208
-		$this->delete_by_type( 'attachment' );
206
+		$this->delete_by_type('post');
207
+		$this->delete_by_type('entity');
208
+		$this->delete_by_type('attachment');
209 209
 
210 210
 	}
211 211
 
@@ -217,17 +217,17 @@  discard block
 block discarded – undo
217 217
 	 *
218 218
 	 * @param string $type WordPress {@link WP_Post}'s type, e.g. `post`, `entity`, `attachment`.
219 219
 	 */
220
-	private function delete_by_type( $type ) {
220
+	private function delete_by_type($type) {
221 221
 
222
-		$posts = get_posts( array(
222
+		$posts = get_posts(array(
223 223
 			'meta_key'    => '_wl_sample_data',
224 224
 			'meta_value'  => 1,
225 225
 			'post_status' => 'any',
226 226
 			'post_type'   => $type,
227
-		) );
227
+		));
228 228
 
229
-		foreach ( $posts as $post ) {
230
-			wp_delete_post( $post->ID, true );
229
+		foreach ($posts as $post) {
230
+			wp_delete_post($post->ID, true);
231 231
 		}
232 232
 
233 233
 	}
@@ -241,19 +241,19 @@  discard block
 block discarded – undo
241 241
 	 *
242 242
 	 * @return int WordPress' attachment's id.
243 243
 	 */
244
-	private function create_attachment_from_local_file( $source ) {
244
+	private function create_attachment_from_local_file($source) {
245 245
 
246 246
 		// Get the path to the upload directory.
247 247
 		$upload_dir  = wp_upload_dir();
248 248
 		$upload_path = $upload_dir['path'];
249 249
 
250 250
 		// Get the destination image path.
251
-		$destination = $upload_path . '/wl-sample-data.png';
251
+		$destination = $upload_path.'/wl-sample-data.png';
252 252
 
253 253
 		// Copy the source file to the destination.
254
-		@copy( $source, $destination );
254
+		@copy($source, $destination);
255 255
 
256
-		return $this->create_attachment( $destination );
256
+		return $this->create_attachment($destination);
257 257
 	}
258 258
 
259 259
 	/**
@@ -267,31 +267,31 @@  discard block
 block discarded – undo
267 267
 	 *
268 268
 	 * @return int The attachment id.
269 269
 	 */
270
-	private function create_attachment( $filename ) {
270
+	private function create_attachment($filename) {
271 271
 
272 272
 		// Check the type of file. We'll use this as the 'post_mime_type'.
273
-		$filetype = wp_check_filetype( basename( $filename ), null );
273
+		$filetype = wp_check_filetype(basename($filename), null);
274 274
 
275 275
 		// Get the path to the upload directory.
276 276
 		$wp_upload_dir = wp_upload_dir();
277 277
 
278 278
 		// Prepare an array of post data for the attachment.
279 279
 		$attachment = array(
280
-			'guid'           => $wp_upload_dir['url'] . '/' . basename( $filename ),
280
+			'guid'           => $wp_upload_dir['url'].'/'.basename($filename),
281 281
 			'post_mime_type' => $filetype['type'],
282
-			'post_title'     => preg_replace( '/\.[^.]+$/', '', basename( $filename ) ),
282
+			'post_title'     => preg_replace('/\.[^.]+$/', '', basename($filename)),
283 283
 			'post_content'   => '',
284 284
 			'post_status'    => 'inherit',
285 285
 		);
286 286
 
287 287
 		// Insert the attachment.
288
-		$attachment_id = wp_insert_attachment( $attachment, $filename );
288
+		$attachment_id = wp_insert_attachment($attachment, $filename);
289 289
 
290 290
 		// Generate the metadata for the attachment, and update the database record.
291
-		$attachment_data = wp_generate_attachment_metadata( $attachment_id, $filename );
291
+		$attachment_data = wp_generate_attachment_metadata($attachment_id, $filename);
292 292
 
293 293
 		// Update the attachment metadata.
294
-		wp_update_attachment_metadata( $attachment_id, $attachment_data );
294
+		wp_update_attachment_metadata($attachment_id, $attachment_data);
295 295
 
296 296
 		return $attachment_id;
297 297
 	}
Please login to merge, or discard this patch.
src/includes/class-wordlift.php 2 patches
Indentation   +1194 added lines, -1194 removed lines patch added patch discarded remove patch
@@ -29,1302 +29,1302 @@
 block discarded – undo
29 29
  */
30 30
 class Wordlift {
31 31
 
32
-	/**
33
-	 * The loader that's responsible for maintaining and registering all hooks that power
34
-	 * the plugin.
35
-	 *
36
-	 * @since    1.0.0
37
-	 * @access   protected
38
-	 * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
39
-	 */
40
-	protected $loader;
41
-
42
-	/**
43
-	 * The unique identifier of this plugin.
44
-	 *
45
-	 * @since    1.0.0
46
-	 * @access   protected
47
-	 * @var      string $plugin_name The string used to uniquely identify this plugin.
48
-	 */
49
-	protected $plugin_name;
50
-
51
-	/**
52
-	 * The current version of the plugin.
53
-	 *
54
-	 * @since    1.0.0
55
-	 * @access   protected
56
-	 * @var      string $version The current version of the plugin.
57
-	 */
58
-	protected $version;
59
-
60
-	/**
61
-	 * The {@link Wordlift_Tinymce_Adapter} instance.
62
-	 *
63
-	 * @since  3.12.0
64
-	 * @access protected
65
-	 * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
66
-	 */
67
-	protected $tinymce_adapter;
68
-
69
-	/**
70
-	 * The Thumbnail service.
71
-	 *
72
-	 * @since  3.1.5
73
-	 * @access private
74
-	 * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service.
75
-	 */
76
-	private $thumbnail_service;
77
-
78
-	/**
79
-	 * The UI service.
80
-	 *
81
-	 * @since  3.2.0
82
-	 * @access private
83
-	 * @var \Wordlift_UI_Service $ui_service The UI service.
84
-	 */
85
-	private $ui_service;
86
-
87
-	/**
88
-	 * The Schema service.
89
-	 *
90
-	 * @since  3.3.0
91
-	 * @access private
92
-	 * @var \Wordlift_Schema_Service $schema_service The Schema service.
93
-	 */
94
-	private $schema_service;
95
-
96
-	/**
97
-	 * The Entity service.
98
-	 *
99
-	 * @since  3.1.0
100
-	 * @access protected
101
-	 * @var \Wordlift_Entity_Service $entity_service The Entity service.
102
-	 */
103
-	protected $entity_service;
104
-
105
-	/**
106
-	 * The Topic Taxonomy service.
107
-	 *
108
-	 * @since  3.5.0
109
-	 * @access private
110
-	 * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
111
-	 */
112
-	private $topic_taxonomy_service;
113
-
114
-	/**
115
-	 * The User service.
116
-	 *
117
-	 * @since  3.1.7
118
-	 * @access protected
119
-	 * @var \Wordlift_User_Service $user_service The User service.
120
-	 */
121
-	protected $user_service;
122
-
123
-	/**
124
-	 * The Timeline service.
125
-	 *
126
-	 * @since  3.1.0
127
-	 * @access private
128
-	 * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
129
-	 */
130
-	private $timeline_service;
131
-
132
-	/**
133
-	 * The Redirect service.
134
-	 *
135
-	 * @since  3.2.0
136
-	 * @access private
137
-	 * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
138
-	 */
139
-	private $redirect_service;
140
-
141
-	/**
142
-	 * The Notice service.
143
-	 *
144
-	 * @since  3.3.0
145
-	 * @access private
146
-	 * @var \Wordlift_Notice_Service $notice_service The Notice service.
147
-	 */
148
-	private $notice_service;
149
-
150
-	/**
151
-	 * The Entity list customization.
152
-	 *
153
-	 * @since  3.3.0
154
-	 * @access private
155
-	 * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
156
-	 */
157
-	private $entity_list_service;
158
-
159
-	/**
160
-	 * The Entity Types Taxonomy Walker.
161
-	 *
162
-	 * @since  3.1.0
163
-	 * @access private
164
-	 * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
165
-	 */
166
-	private $entity_types_taxonomy_walker;
167
-
168
-	/**
169
-	 * The ShareThis service.
170
-	 *
171
-	 * @since  3.2.0
172
-	 * @access private
173
-	 * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
174
-	 */
175
-	private $sharethis_service;
176
-
177
-	/**
178
-	 * The PrimaShop adapter.
179
-	 *
180
-	 * @since  3.2.3
181
-	 * @access private
182
-	 * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
183
-	 */
184
-	private $primashop_adapter;
185
-
186
-	/**
187
-	 * The WordLift Dashboard adapter.
188
-	 *
189
-	 * @since  3.4.0
190
-	 * @access private
191
-	 * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service;
192
-	 */
193
-	private $dashboard_service;
194
-
195
-	/**
196
-	 * The entity type service.
197
-	 *
198
-	 * @since  3.6.0
199
-	 * @access private
200
-	 * @var \Wordlift_Entity_Post_Type_Service
201
-	 */
202
-	private $entity_post_type_service;
203
-
204
-	/**
205
-	 * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
206
-	 *
207
-	 * @since  3.6.0
208
-	 * @access private
209
-	 * @var \Wordlift_Entity_Link_Service
210
-	 */
211
-	private $entity_link_service;
212
-
213
-	/**
214
-	 * A {@link Wordlift_Sparql_Service} instance.
215
-	 *
216
-	 * @var    3.6.0
217
-	 * @access protected
218
-	 * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
219
-	 */
220
-	protected $sparql_service;
221
-
222
-	/**
223
-	 * A {@link Wordlift_Import_Service} instance.
224
-	 *
225
-	 * @since  3.6.0
226
-	 * @access private
227
-	 * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance.
228
-	 */
229
-	private $import_service;
230
-
231
-	/**
232
-	 * A {@link Wordlift_Rebuild_Service} instance.
233
-	 *
234
-	 * @since  3.6.0
235
-	 * @access private
236
-	 * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance.
237
-	 */
238
-	private $rebuild_service;
239
-
240
-	/**
241
-	 * A {@link Wordlift_Jsonld_Service} instance.
242
-	 *
243
-	 * @since  3.7.0
244
-	 * @access protected
245
-	 * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
246
-	 */
247
-	protected $jsonld_service;
248
-
249
-	/**
250
-	 * A {@link Wordlift_Website_Jsonld_Converter} instance.
251
-	 *
252
-	 * @since  3.14.0
253
-	 * @access protected
254
-	 * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
255
-	 */
256
-	protected $jsonld_website_converter;
257
-
258
-	/**
259
-	 *
260
-	 * @since  3.7.0
261
-	 * @access private
262
-	 * @var \Wordlift_Property_Factory $property_factory
263
-	 */
264
-	private $property_factory;
265
-
266
-	/**
267
-	 * The 'Download Your Data' page.
268
-	 *
269
-	 * @since  3.6.0
270
-	 * @access private
271
-	 * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
272
-	 */
273
-	private $download_your_data_page;
274
-
275
-	/**
276
-	 * The 'WordLift Settings' page.
277
-	 *
278
-	 * @since  3.11.0
279
-	 * @access protected
280
-	 * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
281
-	 */
282
-	protected $settings_page;
283
-
284
-	/**
285
-	 * The 'WordLift Batch analysis' page.
286
-	 *
287
-	 * @since  3.14.0
288
-	 * @access protected
289
-	 * @var \Wordlift_Batch_Analysis_Page $sbatch_analysis_page The 'WordLift batcch analysis' page.
290
-	 */
291
-	protected $batch_analysis_page;
292
-
293
-	/**
294
-	 * The install wizard page.
295
-	 *
296
-	 * @since  3.9.0
297
-	 * @access private
298
-	 * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
299
-	 */
300
-	private $admin_setup;
301
-
302
-	/**
303
-	 * The Content Filter Service hooks up to the 'the_content' filter and provides
304
-	 * linking of entities to their pages.
305
-	 *
306
-	 * @since  3.8.0
307
-	 * @access private
308
-	 * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
309
-	 */
310
-	private $content_filter_service;
311
-
312
-	/**
313
-	 * A {@link Wordlift_Key_Validation_Service} instance.
314
-	 *
315
-	 * @since  3.9.0
316
-	 * @access private
317
-	 * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
318
-	 */
319
-	private $key_validation_service;
320
-
321
-	/**
322
-	 * A {@link Wordlift_Rating_Service} instance.
323
-	 *
324
-	 * @since  3.10.0
325
-	 * @access private
326
-	 * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
327
-	 */
328
-	private $rating_service;
329
-
330
-	/**
331
-	 * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
332
-	 *
333
-	 * @since  3.10.0
334
-	 * @access protected
335
-	 * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
336
-	 */
337
-	protected $post_to_jsonld_converter;
338
-
339
-	/**
340
-	 * A {@link Wordlift_Configuration_Service} instance.
341
-	 *
342
-	 * @since  3.10.0
343
-	 * @access protected
344
-	 * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
345
-	 */
346
-	protected $configuration_service;
347
-
348
-	/**
349
-	 * A {@link Wordlift_Entity_Type_Service} instance.
350
-	 *
351
-	 * @since  3.10.0
352
-	 * @access protected
353
-	 * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
354
-	 */
355
-	protected $entity_type_service;
356
-
357
-	/**
358
-	 * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
359
-	 *
360
-	 * @since  3.10.0
361
-	 * @access protected
362
-	 * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
363
-	 */
364
-	protected $entity_post_to_jsonld_converter;
365
-
366
-	/**
367
-	 * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
368
-	 *
369
-	 * @since  3.10.0
370
-	 * @access protected
371
-	 * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
372
-	 */
373
-	protected $postid_to_jsonld_converter;
374
-
375
-	/**
376
-	 * The {@link Wordlift_Admin_Status_Page} class.
377
-	 *
378
-	 * @since  3.9.8
379
-	 * @access private
380
-	 * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
381
-	 */
382
-	private $status_page;
383
-
384
-	/**
385
-	 * The {@link Wordlift_Category_Taxonomy_Service} instance.
386
-	 *
387
-	 * @since  3.11.0
388
-	 * @access protected
389
-	 * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
390
-	 */
391
-	protected $category_taxonomy_service;
392
-
393
-	/**
394
-	 * The {@link Wordlift_Event_Entity_Page_Service} instance.
395
-	 *
396
-	 * @since  3.11.0
397
-	 * @access protected
398
-	 * @var \Wordlift_Event_Entity_Page_Service $event_entity_page_service The {@link Wordlift_Event_Entity_Page_Service} instance.
399
-	 */
400
-	protected $event_entity_page_service;
401
-
402
-	/**
403
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
404
-	 *
405
-	 * @since  3.11.0
406
-	 * @access protected
407
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
408
-	 */
409
-	protected $settings_page_action_link;
410
-
411
-	/**
412
-	 * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
413
-	 *
414
-	 * @since  3.11.0
415
-	 * @access protected
416
-	 * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
417
-	 */
418
-	protected $publisher_ajax_adapter;
419
-
420
-	/**
421
-	 * The {@link Wordlift_Admin_Input_Element} element renderer.
422
-	 *
423
-	 * @since  3.11.0
424
-	 * @access protected
425
-	 * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
426
-	 */
427
-	protected $input_element;
428
-
429
-	/**
430
-	 * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
431
-	 *
432
-	 * @since  3.13.0
433
-	 * @access protected
434
-	 * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
435
-	 */
436
-	protected $radio_input_element;
437
-
438
-	/**
439
-	 * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
440
-	 *
441
-	 * @since  3.11.0
442
-	 * @access protected
443
-	 * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
444
-	 */
445
-	protected $language_select_element;
446
-
447
-	/**
448
-	 * The {@link Wordlift_Admin_Publisher_Element} element renderer.
449
-	 *
450
-	 * @since  3.11.0
451
-	 * @access protected
452
-	 * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
453
-	 */
454
-	protected $publisher_element;
455
-
456
-	/**
457
-	 * The {@link Wordlift_Admin_Select2_Element} element renderer.
458
-	 *
459
-	 * @since  3.11.0
460
-	 * @access protected
461
-	 * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
462
-	 */
463
-	protected $select2_element;
464
-
465
-	/**
466
-	 * The controller for the entity type list admin page
467
-	 *
468
-	 * @since  3.11.0
469
-	 * @access private
470
-	 * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
471
-	 */
472
-	private $entity_type_admin_page;
473
-
474
-	/**
475
-	 * The controller for the entity type settings admin page
476
-	 *
477
-	 * @since  3.11.0
478
-	 * @access private
479
-	 * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
480
-	 */
481
-	private $entity_type_settings_admin_page;
482
-
483
-	/**
484
-	 * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
485
-	 *
486
-	 * @since  3.11.0
487
-	 * @access protected
488
-	 * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
489
-	 */
490
-	protected $related_entities_cloud_widget;
491
-
492
-	/**
493
-	 * The {@link Wordlift_Admin_Author_Element} instance.
494
-	 *
495
-	 * @since  3.14.0
496
-	 * @access protected
497
-	 * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
498
-	 */
499
-	protected $author_element;
500
-
501
-	/**
502
-	 * The {@link Wordlift_Batch_Analysis_Service} instance.
503
-	 *
504
-	 * @since  3.14.0
505
-	 * @access protected
506
-	 * @var \Wordlift_Batch_Analysis_Service $batch_analysis_service The {@link Wordlift_Batch_Analysis_Service} instance.
507
-	 */
508
-	protected $batch_analysis_service;
509
-
510
-	/**
511
-	 * The {@link Wordlift_Sample_Data_Service} instance.
512
-	 *
513
-	 * @since  3.12.0
514
-	 * @access protected
515
-	 * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
516
-	 */
517
-	protected $sample_data_service;
518
-
519
-	/**
520
-	 * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
521
-	 *
522
-	 * @since  3.12.0
523
-	 * @access protected
524
-	 * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
525
-	 */
526
-	protected $sample_data_ajax_adapter;
527
-
528
-	/**
529
-	 * {@link Wordlift}'s singleton instance.
530
-	 *
531
-	 * @since  3.11.2
532
-	 *
533
-	 * @since  3.11.2
534
-	 * @access private
535
-	 * @var Wordlift $instance {@link Wordlift}'s singleton instance.
536
-	 */
537
-	private static $instance;
538
-
539
-	/**
540
-	 * Define the core functionality of the plugin.
541
-	 *
542
-	 * Set the plugin name and the plugin version that can be used throughout the plugin.
543
-	 * Load the dependencies, define the locale, and set the hooks for the admin area and
544
-	 * the public-facing side of the site.
545
-	 *
546
-	 * @since    1.0.0
547
-	 */
548
-	public function __construct() {
549
-
550
-		$this->plugin_name = 'wordlift';
551
-		$this->version     = '3.15.0-dev';
552
-		$this->load_dependencies();
553
-		$this->set_locale();
554
-		$this->define_admin_hooks();
555
-		$this->define_public_hooks();
556
-
557
-		self::$instance = $this;
558
-
559
-	}
560
-
561
-	/**
562
-	 * Get the singleton instance.
563
-	 *
564
-	 * @since 3.11.2
565
-	 *
566
-	 * @return Wordlift The {@link Wordlift} singleton instance.
567
-	 */
568
-	public static function get_instance() {
569
-
570
-		return self::$instance;
571
-	}
572
-
573
-	/**
574
-	 * Load the required dependencies for this plugin.
575
-	 *
576
-	 * Include the following files that make up the plugin:
577
-	 *
578
-	 * - Wordlift_Loader. Orchestrates the hooks of the plugin.
579
-	 * - Wordlift_i18n. Defines internationalization functionality.
580
-	 * - Wordlift_Admin. Defines all hooks for the admin area.
581
-	 * - Wordlift_Public. Defines all hooks for the public side of the site.
582
-	 *
583
-	 * Create an instance of the loader which will be used to register the hooks
584
-	 * with WordPress.
585
-	 *
586
-	 * @since    1.0.0
587
-	 * @access   private
588
-	 */
589
-	private function load_dependencies() {
590
-
591
-		/**
592
-		 * The class responsible for orchestrating the actions and filters of the
593
-		 * core plugin.
594
-		 */
595
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
596
-
597
-		/**
598
-		 * The class responsible for defining internationalization functionality
599
-		 * of the plugin.
600
-		 */
601
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
602
-
603
-		/**
604
-		 * WordLift's supported languages.
605
-		 */
606
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
607
-
608
-		/**
609
-		 * Provide support functions to sanitize data.
610
-		 */
611
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
612
-
613
-		/**
614
-		 * The Redirect service.
615
-		 */
616
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
617
-
618
-		/**
619
-		 * The Log service.
620
-		 */
621
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
622
-
623
-		/**
624
-		 * The configuration service.
625
-		 */
626
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
627
-
628
-		/**
629
-		 * The entity post type service (this is the WordPress post type, not the entity schema type).
630
-		 */
631
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
632
-
633
-		/**
634
-		 * The entity type service (i.e. the schema type).
635
-		 */
636
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
637
-
638
-		/**
639
-		 * The entity link service.
640
-		 */
641
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
642
-
643
-		/**
644
-		 * The Query builder.
645
-		 */
646
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
647
-
648
-		/**
649
-		 * The Schema service.
650
-		 */
651
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
652
-
653
-		/**
654
-		 * The schema:url property service.
655
-		 */
656
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
657
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
658
-
659
-		/**
660
-		 * The UI service.
661
-		 */
662
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
663
-
664
-		/**
665
-		 * The Thumbnail service.
666
-		 */
667
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
668
-
669
-		/**
670
-		 * The Entity Types Taxonomy service.
671
-		 */
672
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
673
-
674
-		/**
675
-		 * The Entity service.
676
-		 */
677
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
678
-
679
-		// Add the entity rating service.
680
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
681
-
682
-		/**
683
-		 * The User service.
684
-		 */
685
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
686
-
687
-		/**
688
-		 * The Timeline service.
689
-		 */
690
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
691
-
692
-		/**
693
-		 * The Topic Taxonomy service.
694
-		 */
695
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
696
-
697
-		/**
698
-		 * The SPARQL service.
699
-		 */
700
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
701
-
702
-		/**
703
-		 * The WordLift import service.
704
-		 */
705
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
706
-
707
-		/**
708
-		 * The WordLift URI service.
709
-		 */
710
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
711
-
712
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
713
-
714
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
715
-
716
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
717
-
718
-		/**
719
-		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
720
-		 */
721
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
722
-
723
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
724
-
725
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
726
-
727
-		/**
728
-		 * Load the converters.
729
-		 */
730
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
731
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
732
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
733
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
734
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
735
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
736
-
737
-		/**
738
-		 * Load the content filter.
739
-		 */
740
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
741
-
742
-		/*
32
+    /**
33
+     * The loader that's responsible for maintaining and registering all hooks that power
34
+     * the plugin.
35
+     *
36
+     * @since    1.0.0
37
+     * @access   protected
38
+     * @var      Wordlift_Loader $loader Maintains and registers all hooks for the plugin.
39
+     */
40
+    protected $loader;
41
+
42
+    /**
43
+     * The unique identifier of this plugin.
44
+     *
45
+     * @since    1.0.0
46
+     * @access   protected
47
+     * @var      string $plugin_name The string used to uniquely identify this plugin.
48
+     */
49
+    protected $plugin_name;
50
+
51
+    /**
52
+     * The current version of the plugin.
53
+     *
54
+     * @since    1.0.0
55
+     * @access   protected
56
+     * @var      string $version The current version of the plugin.
57
+     */
58
+    protected $version;
59
+
60
+    /**
61
+     * The {@link Wordlift_Tinymce_Adapter} instance.
62
+     *
63
+     * @since  3.12.0
64
+     * @access protected
65
+     * @var \Wordlift_Tinymce_Adapter $tinymce_adapter The {@link Wordlift_Tinymce_Adapter} instance.
66
+     */
67
+    protected $tinymce_adapter;
68
+
69
+    /**
70
+     * The Thumbnail service.
71
+     *
72
+     * @since  3.1.5
73
+     * @access private
74
+     * @var \Wordlift_Thumbnail_Service $thumbnail_service The Thumbnail service.
75
+     */
76
+    private $thumbnail_service;
77
+
78
+    /**
79
+     * The UI service.
80
+     *
81
+     * @since  3.2.0
82
+     * @access private
83
+     * @var \Wordlift_UI_Service $ui_service The UI service.
84
+     */
85
+    private $ui_service;
86
+
87
+    /**
88
+     * The Schema service.
89
+     *
90
+     * @since  3.3.0
91
+     * @access private
92
+     * @var \Wordlift_Schema_Service $schema_service The Schema service.
93
+     */
94
+    private $schema_service;
95
+
96
+    /**
97
+     * The Entity service.
98
+     *
99
+     * @since  3.1.0
100
+     * @access protected
101
+     * @var \Wordlift_Entity_Service $entity_service The Entity service.
102
+     */
103
+    protected $entity_service;
104
+
105
+    /**
106
+     * The Topic Taxonomy service.
107
+     *
108
+     * @since  3.5.0
109
+     * @access private
110
+     * @var \Wordlift_Topic_Taxonomy_Service The Topic Taxonomy service.
111
+     */
112
+    private $topic_taxonomy_service;
113
+
114
+    /**
115
+     * The User service.
116
+     *
117
+     * @since  3.1.7
118
+     * @access protected
119
+     * @var \Wordlift_User_Service $user_service The User service.
120
+     */
121
+    protected $user_service;
122
+
123
+    /**
124
+     * The Timeline service.
125
+     *
126
+     * @since  3.1.0
127
+     * @access private
128
+     * @var \Wordlift_Timeline_Service $timeline_service The Timeline service.
129
+     */
130
+    private $timeline_service;
131
+
132
+    /**
133
+     * The Redirect service.
134
+     *
135
+     * @since  3.2.0
136
+     * @access private
137
+     * @var \Wordlift_Redirect_Service $redirect_service The Redirect service.
138
+     */
139
+    private $redirect_service;
140
+
141
+    /**
142
+     * The Notice service.
143
+     *
144
+     * @since  3.3.0
145
+     * @access private
146
+     * @var \Wordlift_Notice_Service $notice_service The Notice service.
147
+     */
148
+    private $notice_service;
149
+
150
+    /**
151
+     * The Entity list customization.
152
+     *
153
+     * @since  3.3.0
154
+     * @access private
155
+     * @var \Wordlift_Entity_List_Service $entity_list_service The Entity list service.
156
+     */
157
+    private $entity_list_service;
158
+
159
+    /**
160
+     * The Entity Types Taxonomy Walker.
161
+     *
162
+     * @since  3.1.0
163
+     * @access private
164
+     * @var \Wordlift_Entity_Types_Taxonomy_Walker $entity_types_taxonomy_walker The Entity Types Taxonomy Walker
165
+     */
166
+    private $entity_types_taxonomy_walker;
167
+
168
+    /**
169
+     * The ShareThis service.
170
+     *
171
+     * @since  3.2.0
172
+     * @access private
173
+     * @var \Wordlift_ShareThis_Service $sharethis_service The ShareThis service.
174
+     */
175
+    private $sharethis_service;
176
+
177
+    /**
178
+     * The PrimaShop adapter.
179
+     *
180
+     * @since  3.2.3
181
+     * @access private
182
+     * @var \Wordlift_PrimaShop_Adapter $primashop_adapter The PrimaShop adapter.
183
+     */
184
+    private $primashop_adapter;
185
+
186
+    /**
187
+     * The WordLift Dashboard adapter.
188
+     *
189
+     * @since  3.4.0
190
+     * @access private
191
+     * @var \Wordlift_Dashboard_Service $dashboard_service The WordLift Dashboard service;
192
+     */
193
+    private $dashboard_service;
194
+
195
+    /**
196
+     * The entity type service.
197
+     *
198
+     * @since  3.6.0
199
+     * @access private
200
+     * @var \Wordlift_Entity_Post_Type_Service
201
+     */
202
+    private $entity_post_type_service;
203
+
204
+    /**
205
+     * The entity link service used to mangle links to entities with a custom slug or even w/o a slug.
206
+     *
207
+     * @since  3.6.0
208
+     * @access private
209
+     * @var \Wordlift_Entity_Link_Service
210
+     */
211
+    private $entity_link_service;
212
+
213
+    /**
214
+     * A {@link Wordlift_Sparql_Service} instance.
215
+     *
216
+     * @var    3.6.0
217
+     * @access protected
218
+     * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
219
+     */
220
+    protected $sparql_service;
221
+
222
+    /**
223
+     * A {@link Wordlift_Import_Service} instance.
224
+     *
225
+     * @since  3.6.0
226
+     * @access private
227
+     * @var \Wordlift_Import_Service $import_service A {@link Wordlift_Import_Service} instance.
228
+     */
229
+    private $import_service;
230
+
231
+    /**
232
+     * A {@link Wordlift_Rebuild_Service} instance.
233
+     *
234
+     * @since  3.6.0
235
+     * @access private
236
+     * @var \Wordlift_Rebuild_Service $rebuild_service A {@link Wordlift_Rebuild_Service} instance.
237
+     */
238
+    private $rebuild_service;
239
+
240
+    /**
241
+     * A {@link Wordlift_Jsonld_Service} instance.
242
+     *
243
+     * @since  3.7.0
244
+     * @access protected
245
+     * @var \Wordlift_Jsonld_Service $jsonld_service A {@link Wordlift_Jsonld_Service} instance.
246
+     */
247
+    protected $jsonld_service;
248
+
249
+    /**
250
+     * A {@link Wordlift_Website_Jsonld_Converter} instance.
251
+     *
252
+     * @since  3.14.0
253
+     * @access protected
254
+     * @var \Wordlift_Website_Jsonld_Converter $jsonld_website_converter A {@link Wordlift_Website_Jsonld_Converter} instance.
255
+     */
256
+    protected $jsonld_website_converter;
257
+
258
+    /**
259
+     *
260
+     * @since  3.7.0
261
+     * @access private
262
+     * @var \Wordlift_Property_Factory $property_factory
263
+     */
264
+    private $property_factory;
265
+
266
+    /**
267
+     * The 'Download Your Data' page.
268
+     *
269
+     * @since  3.6.0
270
+     * @access private
271
+     * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
272
+     */
273
+    private $download_your_data_page;
274
+
275
+    /**
276
+     * The 'WordLift Settings' page.
277
+     *
278
+     * @since  3.11.0
279
+     * @access protected
280
+     * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
281
+     */
282
+    protected $settings_page;
283
+
284
+    /**
285
+     * The 'WordLift Batch analysis' page.
286
+     *
287
+     * @since  3.14.0
288
+     * @access protected
289
+     * @var \Wordlift_Batch_Analysis_Page $sbatch_analysis_page The 'WordLift batcch analysis' page.
290
+     */
291
+    protected $batch_analysis_page;
292
+
293
+    /**
294
+     * The install wizard page.
295
+     *
296
+     * @since  3.9.0
297
+     * @access private
298
+     * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
299
+     */
300
+    private $admin_setup;
301
+
302
+    /**
303
+     * The Content Filter Service hooks up to the 'the_content' filter and provides
304
+     * linking of entities to their pages.
305
+     *
306
+     * @since  3.8.0
307
+     * @access private
308
+     * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
309
+     */
310
+    private $content_filter_service;
311
+
312
+    /**
313
+     * A {@link Wordlift_Key_Validation_Service} instance.
314
+     *
315
+     * @since  3.9.0
316
+     * @access private
317
+     * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
318
+     */
319
+    private $key_validation_service;
320
+
321
+    /**
322
+     * A {@link Wordlift_Rating_Service} instance.
323
+     *
324
+     * @since  3.10.0
325
+     * @access private
326
+     * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
327
+     */
328
+    private $rating_service;
329
+
330
+    /**
331
+     * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
332
+     *
333
+     * @since  3.10.0
334
+     * @access protected
335
+     * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
336
+     */
337
+    protected $post_to_jsonld_converter;
338
+
339
+    /**
340
+     * A {@link Wordlift_Configuration_Service} instance.
341
+     *
342
+     * @since  3.10.0
343
+     * @access protected
344
+     * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
345
+     */
346
+    protected $configuration_service;
347
+
348
+    /**
349
+     * A {@link Wordlift_Entity_Type_Service} instance.
350
+     *
351
+     * @since  3.10.0
352
+     * @access protected
353
+     * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
354
+     */
355
+    protected $entity_type_service;
356
+
357
+    /**
358
+     * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
359
+     *
360
+     * @since  3.10.0
361
+     * @access protected
362
+     * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
363
+     */
364
+    protected $entity_post_to_jsonld_converter;
365
+
366
+    /**
367
+     * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
368
+     *
369
+     * @since  3.10.0
370
+     * @access protected
371
+     * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
372
+     */
373
+    protected $postid_to_jsonld_converter;
374
+
375
+    /**
376
+     * The {@link Wordlift_Admin_Status_Page} class.
377
+     *
378
+     * @since  3.9.8
379
+     * @access private
380
+     * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
381
+     */
382
+    private $status_page;
383
+
384
+    /**
385
+     * The {@link Wordlift_Category_Taxonomy_Service} instance.
386
+     *
387
+     * @since  3.11.0
388
+     * @access protected
389
+     * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
390
+     */
391
+    protected $category_taxonomy_service;
392
+
393
+    /**
394
+     * The {@link Wordlift_Event_Entity_Page_Service} instance.
395
+     *
396
+     * @since  3.11.0
397
+     * @access protected
398
+     * @var \Wordlift_Event_Entity_Page_Service $event_entity_page_service The {@link Wordlift_Event_Entity_Page_Service} instance.
399
+     */
400
+    protected $event_entity_page_service;
401
+
402
+    /**
403
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
404
+     *
405
+     * @since  3.11.0
406
+     * @access protected
407
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
408
+     */
409
+    protected $settings_page_action_link;
410
+
411
+    /**
412
+     * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
413
+     *
414
+     * @since  3.11.0
415
+     * @access protected
416
+     * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
417
+     */
418
+    protected $publisher_ajax_adapter;
419
+
420
+    /**
421
+     * The {@link Wordlift_Admin_Input_Element} element renderer.
422
+     *
423
+     * @since  3.11.0
424
+     * @access protected
425
+     * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
426
+     */
427
+    protected $input_element;
428
+
429
+    /**
430
+     * The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
431
+     *
432
+     * @since  3.13.0
433
+     * @access protected
434
+     * @var \Wordlift_Admin_Radio_Input_Element $radio_input_element The {@link Wordlift_Admin_Radio_Input_Element} element renderer.
435
+     */
436
+    protected $radio_input_element;
437
+
438
+    /**
439
+     * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
440
+     *
441
+     * @since  3.11.0
442
+     * @access protected
443
+     * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
444
+     */
445
+    protected $language_select_element;
446
+
447
+    /**
448
+     * The {@link Wordlift_Admin_Publisher_Element} element renderer.
449
+     *
450
+     * @since  3.11.0
451
+     * @access protected
452
+     * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
453
+     */
454
+    protected $publisher_element;
455
+
456
+    /**
457
+     * The {@link Wordlift_Admin_Select2_Element} element renderer.
458
+     *
459
+     * @since  3.11.0
460
+     * @access protected
461
+     * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
462
+     */
463
+    protected $select2_element;
464
+
465
+    /**
466
+     * The controller for the entity type list admin page
467
+     *
468
+     * @since  3.11.0
469
+     * @access private
470
+     * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
471
+     */
472
+    private $entity_type_admin_page;
473
+
474
+    /**
475
+     * The controller for the entity type settings admin page
476
+     *
477
+     * @since  3.11.0
478
+     * @access private
479
+     * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
480
+     */
481
+    private $entity_type_settings_admin_page;
482
+
483
+    /**
484
+     * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
485
+     *
486
+     * @since  3.11.0
487
+     * @access protected
488
+     * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
489
+     */
490
+    protected $related_entities_cloud_widget;
491
+
492
+    /**
493
+     * The {@link Wordlift_Admin_Author_Element} instance.
494
+     *
495
+     * @since  3.14.0
496
+     * @access protected
497
+     * @var \Wordlift_Admin_Author_Element $author_element The {@link Wordlift_Admin_Author_Element} instance.
498
+     */
499
+    protected $author_element;
500
+
501
+    /**
502
+     * The {@link Wordlift_Batch_Analysis_Service} instance.
503
+     *
504
+     * @since  3.14.0
505
+     * @access protected
506
+     * @var \Wordlift_Batch_Analysis_Service $batch_analysis_service The {@link Wordlift_Batch_Analysis_Service} instance.
507
+     */
508
+    protected $batch_analysis_service;
509
+
510
+    /**
511
+     * The {@link Wordlift_Sample_Data_Service} instance.
512
+     *
513
+     * @since  3.12.0
514
+     * @access protected
515
+     * @var \Wordlift_Sample_Data_Service $sample_data_service The {@link Wordlift_Sample_Data_Service} instance.
516
+     */
517
+    protected $sample_data_service;
518
+
519
+    /**
520
+     * The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
521
+     *
522
+     * @since  3.12.0
523
+     * @access protected
524
+     * @var \Wordlift_Sample_Data_Ajax_Adapter $sample_data_ajax_adapter The {@link Wordlift_Sample_Data_Ajax_Adapter} instance.
525
+     */
526
+    protected $sample_data_ajax_adapter;
527
+
528
+    /**
529
+     * {@link Wordlift}'s singleton instance.
530
+     *
531
+     * @since  3.11.2
532
+     *
533
+     * @since  3.11.2
534
+     * @access private
535
+     * @var Wordlift $instance {@link Wordlift}'s singleton instance.
536
+     */
537
+    private static $instance;
538
+
539
+    /**
540
+     * Define the core functionality of the plugin.
541
+     *
542
+     * Set the plugin name and the plugin version that can be used throughout the plugin.
543
+     * Load the dependencies, define the locale, and set the hooks for the admin area and
544
+     * the public-facing side of the site.
545
+     *
546
+     * @since    1.0.0
547
+     */
548
+    public function __construct() {
549
+
550
+        $this->plugin_name = 'wordlift';
551
+        $this->version     = '3.15.0-dev';
552
+        $this->load_dependencies();
553
+        $this->set_locale();
554
+        $this->define_admin_hooks();
555
+        $this->define_public_hooks();
556
+
557
+        self::$instance = $this;
558
+
559
+    }
560
+
561
+    /**
562
+     * Get the singleton instance.
563
+     *
564
+     * @since 3.11.2
565
+     *
566
+     * @return Wordlift The {@link Wordlift} singleton instance.
567
+     */
568
+    public static function get_instance() {
569
+
570
+        return self::$instance;
571
+    }
572
+
573
+    /**
574
+     * Load the required dependencies for this plugin.
575
+     *
576
+     * Include the following files that make up the plugin:
577
+     *
578
+     * - Wordlift_Loader. Orchestrates the hooks of the plugin.
579
+     * - Wordlift_i18n. Defines internationalization functionality.
580
+     * - Wordlift_Admin. Defines all hooks for the admin area.
581
+     * - Wordlift_Public. Defines all hooks for the public side of the site.
582
+     *
583
+     * Create an instance of the loader which will be used to register the hooks
584
+     * with WordPress.
585
+     *
586
+     * @since    1.0.0
587
+     * @access   private
588
+     */
589
+    private function load_dependencies() {
590
+
591
+        /**
592
+         * The class responsible for orchestrating the actions and filters of the
593
+         * core plugin.
594
+         */
595
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
596
+
597
+        /**
598
+         * The class responsible for defining internationalization functionality
599
+         * of the plugin.
600
+         */
601
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
602
+
603
+        /**
604
+         * WordLift's supported languages.
605
+         */
606
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
607
+
608
+        /**
609
+         * Provide support functions to sanitize data.
610
+         */
611
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
612
+
613
+        /**
614
+         * The Redirect service.
615
+         */
616
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
617
+
618
+        /**
619
+         * The Log service.
620
+         */
621
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
622
+
623
+        /**
624
+         * The configuration service.
625
+         */
626
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
627
+
628
+        /**
629
+         * The entity post type service (this is the WordPress post type, not the entity schema type).
630
+         */
631
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
632
+
633
+        /**
634
+         * The entity type service (i.e. the schema type).
635
+         */
636
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
637
+
638
+        /**
639
+         * The entity link service.
640
+         */
641
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
642
+
643
+        /**
644
+         * The Query builder.
645
+         */
646
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
647
+
648
+        /**
649
+         * The Schema service.
650
+         */
651
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
652
+
653
+        /**
654
+         * The schema:url property service.
655
+         */
656
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
657
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
658
+
659
+        /**
660
+         * The UI service.
661
+         */
662
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
663
+
664
+        /**
665
+         * The Thumbnail service.
666
+         */
667
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
668
+
669
+        /**
670
+         * The Entity Types Taxonomy service.
671
+         */
672
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
673
+
674
+        /**
675
+         * The Entity service.
676
+         */
677
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
678
+
679
+        // Add the entity rating service.
680
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
681
+
682
+        /**
683
+         * The User service.
684
+         */
685
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
686
+
687
+        /**
688
+         * The Timeline service.
689
+         */
690
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
691
+
692
+        /**
693
+         * The Topic Taxonomy service.
694
+         */
695
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
696
+
697
+        /**
698
+         * The SPARQL service.
699
+         */
700
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
701
+
702
+        /**
703
+         * The WordLift import service.
704
+         */
705
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
706
+
707
+        /**
708
+         * The WordLift URI service.
709
+         */
710
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
711
+
712
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
713
+
714
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
715
+
716
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
717
+
718
+        /**
719
+         * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
720
+         */
721
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
722
+
723
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
724
+
725
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
726
+
727
+        /**
728
+         * Load the converters.
729
+         */
730
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
731
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
732
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
733
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
734
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
735
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
736
+
737
+        /**
738
+         * Load the content filter.
739
+         */
740
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
741
+
742
+        /*
743 743
 		 * Load the excerpt helper.
744 744
 		 */
745
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
746
-
747
-		/**
748
-		 * Load the JSON-LD service to publish entities using JSON-LD.s
749
-		 *
750
-		 * @since 3.8.0
751
-		 */
752
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
753
-
754
-		// The Publisher Service and the AJAX adapter.
755
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
756
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
757
-
758
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
759
-
760
-		/**
761
-		 * Load the WordLift key validation service.
762
-		 */
763
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
764
-
765
-		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
766
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
767
-
768
-		// Load the `Wordlift_Event_Entity_Page_Service` class definition.
769
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-event-entity-page-service.php';
770
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-service.php';
771
-
772
-		/** Adapters. */
773
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
774
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
775
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
776
-
777
-		/** Async Tasks. */
778
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/wp-async-task.php';
779
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
780
-
781
-		/**
782
-		 * The class responsible for defining all actions that occur in the admin area.
783
-		 */
784
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
785
-
786
-		/**
787
-		 * The class to customize the entity list admin page.
788
-		 */
789
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
790
-
791
-		/**
792
-		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
793
-		 */
794
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
795
-
796
-		/**
797
-		 * The Notice service.
798
-		 */
799
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
800
-
801
-		/**
802
-		 * The PrimaShop adapter.
803
-		 */
804
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
805
-
806
-		/**
807
-		 * The WordLift Dashboard service.
808
-		 */
809
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
810
-
811
-		/**
812
-		 * The admin 'Install wizard' page.
813
-		 */
814
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
745
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
746
+
747
+        /**
748
+         * Load the JSON-LD service to publish entities using JSON-LD.s
749
+         *
750
+         * @since 3.8.0
751
+         */
752
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
753
+
754
+        // The Publisher Service and the AJAX adapter.
755
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
756
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
757
+
758
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
759
+
760
+        /**
761
+         * Load the WordLift key validation service.
762
+         */
763
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
764
+
765
+        // Load the `Wordlift_Category_Taxonomy_Service` class definition.
766
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
767
+
768
+        // Load the `Wordlift_Event_Entity_Page_Service` class definition.
769
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-event-entity-page-service.php';
770
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-service.php';
771
+
772
+        /** Adapters. */
773
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
774
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
775
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
776
+
777
+        /** Async Tasks. */
778
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/wp-async-task.php';
779
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
780
+
781
+        /**
782
+         * The class responsible for defining all actions that occur in the admin area.
783
+         */
784
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
785
+
786
+        /**
787
+         * The class to customize the entity list admin page.
788
+         */
789
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
790
+
791
+        /**
792
+         * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
793
+         */
794
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
795
+
796
+        /**
797
+         * The Notice service.
798
+         */
799
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
800
+
801
+        /**
802
+         * The PrimaShop adapter.
803
+         */
804
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
805
+
806
+        /**
807
+         * The WordLift Dashboard service.
808
+         */
809
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
810
+
811
+        /**
812
+         * The admin 'Install wizard' page.
813
+         */
814
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
815
+
816
+        /**
817
+         * The WordLift entity type list admin page controller.
818
+         */
819
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
820
+
821
+        /**
822
+         * The WordLift entity type settings admin page controller.
823
+         */
824
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
825
+
826
+        /**
827
+         * The admin 'Download Your Data' page.
828
+         */
829
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
830
+
831
+        /**
832
+         * The admin 'Download Your Data' page.
833
+         */
834
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
835
+
836
+        /**
837
+         * The admin 'WordLift Settings' page.
838
+         */
839
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
840
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
841
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-radio-element.php';
842
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
843
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
844
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
845
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-author-element.php';
846
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
847
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
848
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
849
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-batch-analysis-page.php';
850
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
851
+
852
+        /** Admin Pages */
853
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
854
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
855
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
856
+
857
+        /**
858
+         * The class responsible for defining all actions that occur in the public-facing
859
+         * side of the site.
860
+         */
861
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
862
+
863
+        /**
864
+         * The shortcode abstract class.
865
+         */
866
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
867
+
868
+        /**
869
+         * The Timeline shortcode.
870
+         */
871
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
872
+
873
+        /**
874
+         * The Navigator shortcode.
875
+         */
876
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
877
+
878
+        /**
879
+         * The chord shortcode.
880
+         */
881
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
882
+
883
+        /**
884
+         * The geomap shortcode.
885
+         */
886
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
887
+
888
+        /**
889
+         * The entity cloud shortcode.
890
+         */
891
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
892
+
893
+        /**
894
+         * The ShareThis service.
895
+         */
896
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
815 897
 
816
-		/**
817
-		 * The WordLift entity type list admin page controller.
818
-		 */
819
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
820
-
821
-		/**
822
-		 * The WordLift entity type settings admin page controller.
823
-		 */
824
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
825
-
826
-		/**
827
-		 * The admin 'Download Your Data' page.
828
-		 */
829
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
830
-
831
-		/**
832
-		 * The admin 'Download Your Data' page.
833
-		 */
834
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
835
-
836
-		/**
837
-		 * The admin 'WordLift Settings' page.
838
-		 */
839
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
841
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-radio-element.php';
842
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
843
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
844
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-author-element.php';
846
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
847
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
848
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
849
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-batch-analysis-page.php';
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
851
-
852
-		/** Admin Pages */
853
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
854
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
855
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
856
-
857
-		/**
858
-		 * The class responsible for defining all actions that occur in the public-facing
859
-		 * side of the site.
860
-		 */
861
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
862
-
863
-		/**
864
-		 * The shortcode abstract class.
865
-		 */
866
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
867
-
868
-		/**
869
-		 * The Timeline shortcode.
870
-		 */
871
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
898
+        /**
899
+         * The SEO service.
900
+         */
901
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
872 902
 
873
-		/**
874
-		 * The Navigator shortcode.
875
-		 */
876
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
877
-
878
-		/**
879
-		 * The chord shortcode.
880
-		 */
881
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
882
-
883
-		/**
884
-		 * The geomap shortcode.
885
-		 */
886
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
887
-
888
-		/**
889
-		 * The entity cloud shortcode.
890
-		 */
891
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
892
-
893
-		/**
894
-		 * The ShareThis service.
895
-		 */
896
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
897
-
898
-		/**
899
-		 * The SEO service.
900
-		 */
901
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
902
-
903
-		/**
904
-		 * The AMP service.
905
-		 */
906
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
903
+        /**
904
+         * The AMP service.
905
+         */
906
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
907 907
 
908
-		/** Widgets */
909
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
910
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
908
+        /** Widgets */
909
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
910
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
911 911
 
912
-		$this->loader = new Wordlift_Loader();
912
+        $this->loader = new Wordlift_Loader();
913 913
 
914
-		// Instantiate a global logger.
915
-		global $wl_logger;
916
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
914
+        // Instantiate a global logger.
915
+        global $wl_logger;
916
+        $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
917 917
 
918
-		// Create the configuration service.
919
-		$this->configuration_service = new Wordlift_Configuration_Service();
918
+        // Create the configuration service.
919
+        $this->configuration_service = new Wordlift_Configuration_Service();
920 920
 
921
-		// Create an entity type service instance. It'll be later bound to the init action.
922
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
921
+        // Create an entity type service instance. It'll be later bound to the init action.
922
+        $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
923 923
 
924
-		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
925
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
924
+        // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
925
+        $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
926 926
 
927
-		// Create an instance of the UI service.
928
-		$this->ui_service = new Wordlift_UI_Service();
927
+        // Create an instance of the UI service.
928
+        $this->ui_service = new Wordlift_UI_Service();
929 929
 
930
-		// Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
931
-		$this->thumbnail_service = new Wordlift_Thumbnail_Service();
930
+        // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
931
+        $this->thumbnail_service = new Wordlift_Thumbnail_Service();
932 932
 
933
-		$this->sparql_service = new Wordlift_Sparql_Service();
933
+        $this->sparql_service = new Wordlift_Sparql_Service();
934 934
 
935
-		// Create an instance of the Schema service.
936
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
937
-		$this->schema_service        = new Wordlift_Schema_Service();
935
+        // Create an instance of the Schema service.
936
+        $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
937
+        $this->schema_service        = new Wordlift_Schema_Service();
938 938
 
939
-		// Create an instance of the Notice service.
940
-		$this->notice_service = new Wordlift_Notice_Service();
939
+        // Create an instance of the Notice service.
940
+        $this->notice_service = new Wordlift_Notice_Service();
941 941
 
942
-		// Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
943
-		$this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
942
+        // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
943
+        $this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
944 944
 
945
-		// Create an instance of the User service.
946
-		$this->user_service = new Wordlift_User_Service();
945
+        // Create an instance of the User service.
946
+        $this->user_service = new Wordlift_User_Service();
947 947
 
948
-		// Create a new instance of the Timeline service and Timeline shortcode.
949
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
948
+        // Create a new instance of the Timeline service and Timeline shortcode.
949
+        $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
950 950
 
951
-		// Create a new instance of the Redirect service.
952
-		$this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
951
+        // Create a new instance of the Redirect service.
952
+        $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
953 953
 
954
-		// Initialize the shortcodes.
955
-		new Wordlift_Navigator_Shortcode();
956
-		new Wordlift_Chord_Shortcode();
957
-		new Wordlift_Geomap_Shortcode();
958
-		new Wordlift_Timeline_Shortcode();
959
-		new Wordlift_Related_Entities_Cloud_Shortcode();
954
+        // Initialize the shortcodes.
955
+        new Wordlift_Navigator_Shortcode();
956
+        new Wordlift_Chord_Shortcode();
957
+        new Wordlift_Geomap_Shortcode();
958
+        new Wordlift_Timeline_Shortcode();
959
+        new Wordlift_Related_Entities_Cloud_Shortcode();
960 960
 
961
-		// Initialize the SEO service.
962
-		new Wordlift_Seo_Service();
961
+        // Initialize the SEO service.
962
+        new Wordlift_Seo_Service();
963 963
 
964
-		// Initialize the AMP service.
965
-		new Wordlift_AMP_Service();
964
+        // Initialize the AMP service.
965
+        new Wordlift_AMP_Service();
966 966
 
967
-		$this->batch_analysis_service = new Wordlift_Batch_Analysis_Service( $this, $this->configuration_service );
967
+        $this->batch_analysis_service = new Wordlift_Batch_Analysis_Service( $this, $this->configuration_service );
968 968
 
969
-		$this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
969
+        $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
970 970
 
971
-		$this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service();
971
+        $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service();
972 972
 
973
-		// Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
974
-		$this->sharethis_service = new Wordlift_ShareThis_Service();
973
+        // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
974
+        $this->sharethis_service = new Wordlift_ShareThis_Service();
975 975
 
976
-		// Create an instance of the PrimaShop adapter.
977
-		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
976
+        // Create an instance of the PrimaShop adapter.
977
+        $this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
978 978
 
979
-		// Create an import service instance to hook later to WP's import function.
980
-		$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() );
979
+        // Create an import service instance to hook later to WP's import function.
980
+        $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() );
981 981
 
982
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
982
+        $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
983 983
 
984
-		// Create a Rebuild Service instance, which we'll later bound to an ajax call.
985
-		$this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
984
+        // Create a Rebuild Service instance, which we'll later bound to an ajax call.
985
+        $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
986 986
 
987
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
987
+        $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
988 988
 
989
-		// Create the entity rating service.
990
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
989
+        // Create the entity rating service.
990
+        $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
991 991
 
992
-		// Create entity list customization (wp-admin/edit.php)
993
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
992
+        // Create entity list customization (wp-admin/edit.php)
993
+        $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
994 994
 
995
-		// Create a new instance of the Redirect service.
996
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
995
+        // Create a new instance of the Redirect service.
996
+        $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
997 997
 
998
-		$this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
999
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
998
+        $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
999
+        $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
1000 1000
 
1001
-		$attachment_service = new Wordlift_Attachment_Service();
1001
+        $attachment_service = new Wordlift_Attachment_Service();
1002 1002
 
1003
-		// Instantiate the JSON-LD service.
1004
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1005
-		$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 );
1006
-		$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, $this->entity_post_to_jsonld_converter );
1007
-		$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 );
1008
-		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service, $this->entity_post_to_jsonld_converter );
1009
-		$this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter, $this->jsonld_website_converter );
1003
+        // Instantiate the JSON-LD service.
1004
+        $property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1005
+        $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 );
1006
+        $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, $this->entity_post_to_jsonld_converter );
1007
+        $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 );
1008
+        $this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service, $this->entity_post_to_jsonld_converter );
1009
+        $this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter, $this->jsonld_website_converter );
1010 1010
 
1011
-		// Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins).
1012
-		$this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service );
1011
+        // Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins).
1012
+        $this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service );
1013 1013
 
1014
-		// Create an instance of the Publisher Service and the AJAX Adapter.
1015
-		$publisher_service            = new Wordlift_Publisher_Service();
1016
-		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
1014
+        // Create an instance of the Publisher Service and the AJAX Adapter.
1015
+        $publisher_service            = new Wordlift_Publisher_Service();
1016
+        $this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
1017 1017
 
1018
-		$this->sample_data_service      = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service );
1019
-		$this->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service );
1018
+        $this->sample_data_service      = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service );
1019
+        $this->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service );
1020 1020
 
1021
-		/** Adapters. */
1022
-		$this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this );
1021
+        /** Adapters. */
1022
+        $this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this );
1023 1023
 
1024
-		/** Async Tasks. */
1025
-		new Wordlift_Sparql_Query_Async_Task();
1024
+        /** Async Tasks. */
1025
+        new Wordlift_Sparql_Query_Async_Task();
1026 1026
 
1027
-		/** WordPress Admin UI. */
1027
+        /** WordPress Admin UI. */
1028 1028
 
1029
-		// UI elements.
1030
-		$this->input_element           = new Wordlift_Admin_Input_Element();
1031
-		$this->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1032
-		$this->select2_element         = new Wordlift_Admin_Select2_Element();
1033
-		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1034
-		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1035
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
1036
-		$this->author_element          = new Wordlift_Admin_Author_Element( $publisher_service, $this->select2_element );
1029
+        // UI elements.
1030
+        $this->input_element           = new Wordlift_Admin_Input_Element();
1031
+        $this->radio_input_element     = new Wordlift_Admin_Radio_Input_Element();
1032
+        $this->select2_element         = new Wordlift_Admin_Select2_Element();
1033
+        $this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1034
+        $tabs_element                  = new Wordlift_Admin_Tabs_Element();
1035
+        $this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
1036
+        $this->author_element          = new Wordlift_Admin_Author_Element( $publisher_service, $this->select2_element );
1037 1037
 
1038
-		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1039
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element, $this->radio_input_element );
1040
-		$this->batch_analysis_page       = new Wordlift_Batch_Analysis_Page( $this->batch_analysis_service );
1041
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1038
+        $this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1039
+        $this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element, $this->radio_input_element );
1040
+        $this->batch_analysis_page       = new Wordlift_Batch_Analysis_Page( $this->batch_analysis_service );
1041
+        $this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1042 1042
 
1043
-		// Pages.
1044
-		new Wordlift_Admin_Post_Edit_Page( $this );
1043
+        // Pages.
1044
+        new Wordlift_Admin_Post_Edit_Page( $this );
1045 1045
 
1046
-		// create an instance of the entity type list admin page controller.
1047
-		$this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1046
+        // create an instance of the entity type list admin page controller.
1047
+        $this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
1048 1048
 
1049
-		// create an instance of the entity type etting admin page controller.
1050
-		$this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1049
+        // create an instance of the entity type etting admin page controller.
1050
+        $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
1051 1051
 
1052
-		/** Widgets */
1053
-		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1052
+        /** Widgets */
1053
+        $this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1054 1054
 
1055
-		//** WordPress Admin */
1056
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1057
-		$this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1055
+        //** WordPress Admin */
1056
+        $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1057
+        $this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1058 1058
 
1059
-		// Create an instance of the install wizard.
1060
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
1059
+        // Create an instance of the install wizard.
1060
+        $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
1061 1061
 
1062
-		// Create an instance of the content filter service.
1063
-		$this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service );
1062
+        // Create an instance of the content filter service.
1063
+        $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service );
1064 1064
 
1065
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1065
+        $this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1066 1066
 
1067
-		// User Profile.
1068
-		new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1067
+        // User Profile.
1068
+        new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1069 1069
 
1070
-		$this->event_entity_page_service = new Wordlift_Event_Entity_Page_Service();
1070
+        $this->event_entity_page_service = new Wordlift_Event_Entity_Page_Service();
1071 1071
 
1072
-		// Load the debug service if WP is in debug mode.
1073
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1074
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1075
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1076
-		}
1072
+        // Load the debug service if WP is in debug mode.
1073
+        if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1074
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1075
+            new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1076
+        }
1077 1077
 
1078
-	}
1078
+    }
1079 1079
 
1080
-	/**
1081
-	 * Define the locale for this plugin for internationalization.
1082
-	 *
1083
-	 * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1084
-	 * with WordPress.
1085
-	 *
1086
-	 * @since    1.0.0
1087
-	 * @access   private
1088
-	 */
1089
-	private function set_locale() {
1080
+    /**
1081
+     * Define the locale for this plugin for internationalization.
1082
+     *
1083
+     * Uses the Wordlift_i18n class in order to set the domain and to register the hook
1084
+     * with WordPress.
1085
+     *
1086
+     * @since    1.0.0
1087
+     * @access   private
1088
+     */
1089
+    private function set_locale() {
1090 1090
 
1091
-		$plugin_i18n = new Wordlift_i18n();
1092
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1091
+        $plugin_i18n = new Wordlift_i18n();
1092
+        $plugin_i18n->set_domain( $this->get_plugin_name() );
1093 1093
 
1094
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1094
+        $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1095 1095
 
1096
-	}
1096
+    }
1097 1097
 
1098
-	/**
1099
-	 * Register all of the hooks related to the admin area functionality
1100
-	 * of the plugin.
1101
-	 *
1102
-	 * @since    1.0.0
1103
-	 * @access   private
1104
-	 */
1105
-	private function define_admin_hooks() {
1098
+    /**
1099
+     * Register all of the hooks related to the admin area functionality
1100
+     * of the plugin.
1101
+     *
1102
+     * @since    1.0.0
1103
+     * @access   private
1104
+     */
1105
+    private function define_admin_hooks() {
1106 1106
 
1107
-		$plugin_admin = new Wordlift_Admin(
1108
-			$this->get_plugin_name(),
1109
-			$this->get_version(),
1110
-			$this->configuration_service,
1111
-			$this->notice_service,
1112
-			$this->user_service
1113
-		);
1107
+        $plugin_admin = new Wordlift_Admin(
1108
+            $this->get_plugin_name(),
1109
+            $this->get_version(),
1110
+            $this->configuration_service,
1111
+            $this->notice_service,
1112
+            $this->user_service
1113
+        );
1114 1114
 
1115
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1116
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
1115
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1116
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
1117 1117
 
1118
-		// Hook the init action to the Topic Taxonomy service.
1119
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1118
+        // Hook the init action to the Topic Taxonomy service.
1119
+        $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1120 1120
 
1121
-		// Hook the deleted_post_meta action to the Thumbnail service.
1122
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1121
+        // Hook the deleted_post_meta action to the Thumbnail service.
1122
+        $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1123 1123
 
1124
-		// Hook the added_post_meta action to the Thumbnail service.
1125
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1124
+        // Hook the added_post_meta action to the Thumbnail service.
1125
+        $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1126 1126
 
1127
-		// Hook the updated_post_meta action to the Thumbnail service.
1128
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1127
+        // Hook the updated_post_meta action to the Thumbnail service.
1128
+        $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1129 1129
 
1130
-		// Hook posts inserts (or updates) to the user service.
1131
-		$this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1130
+        // Hook posts inserts (or updates) to the user service.
1131
+        $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1132 1132
 
1133
-		// Hook the AJAX wl_timeline action to the Timeline service.
1134
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1133
+        // Hook the AJAX wl_timeline action to the Timeline service.
1134
+        $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1135 1135
 
1136
-		// Register custom allowed redirect hosts.
1137
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1138
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1139
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1140
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1141
-		$this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1142
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1143
-		$this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1136
+        // Register custom allowed redirect hosts.
1137
+        $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1138
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1139
+        $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1140
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1141
+        $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1142
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1143
+        $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1144 1144
 
1145
-		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1146
-		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1147
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1148
-		$this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1145
+        // Hook save_post to the entity service to update custom fields (such as alternate labels).
1146
+        // We have a priority of 9 because we want to be executed before data is sent to Redlink.
1147
+        $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1148
+        $this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1149 1149
 
1150
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1151
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1150
+        $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1151
+        $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1152 1152
 
1153
-		// Entity listing customization (wp-admin/edit.php)
1154
-		// Add custom columns
1155
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1156
-		$this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1157
-		// Add 4W selection
1158
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1159
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1153
+        // Entity listing customization (wp-admin/edit.php)
1154
+        // Add custom columns
1155
+        $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1156
+        $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1157
+        // Add 4W selection
1158
+        $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1159
+        $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1160 1160
 
1161
-		$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1162
-
1163
-		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1164
-		// entities.
1165
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1161
+        $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1162
+
1163
+        // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1164
+        // entities.
1165
+        $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1166 1166
 
1167
-		// Filter imported post meta.
1168
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1169
-
1170
-		// Notify the import service when an import starts and ends.
1171
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1172
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1173
-
1174
-		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1175
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1176
-
1177
-		// Hook the menu to the Download Your Data page.
1178
-		$this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1179
-		$this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1180
-		$this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1181
-
1182
-		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1183
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1184
-
1185
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1186
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1167
+        // Filter imported post meta.
1168
+        $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1169
+
1170
+        // Notify the import service when an import starts and ends.
1171
+        $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1172
+        $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1173
+
1174
+        // Hook the AJAX wl_rebuild action to the Rebuild Service.
1175
+        $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1176
+
1177
+        // Hook the menu to the Download Your Data page.
1178
+        $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1179
+        $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1180
+        $this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1181
+
1182
+        // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1183
+        $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1184
+
1185
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1186
+        $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1187 1187
 
1188
-		// Hook the AJAX wl_validate_key action to the Key Validation service.
1189
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1188
+        // Hook the AJAX wl_validate_key action to the Key Validation service.
1189
+        $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1190 1190
 
1191
-		// Hook the `admin_init` function to the Admin Setup.
1192
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1191
+        // Hook the `admin_init` function to the Admin Setup.
1192
+        $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1193 1193
 
1194
-		// Hook the admin_init to the settings page.
1195
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1196
-
1197
-		// Hook the menu creation on the general wordlift menu creation
1198
-		$this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1199
-		if ( defined( 'WORDLIFT_BATCH' ) && WORDLIFT_BATCH ) {
1200
-			// Add the functionality only if a flag is set in wp-config.php .
1201
-			$this->loader->add_action( 'wl_admin_menu', $this->batch_analysis_page, 'admin_menu', 10, 2 );
1202
-		}
1194
+        // Hook the admin_init to the settings page.
1195
+        $this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1196
+
1197
+        // Hook the menu creation on the general wordlift menu creation
1198
+        $this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1199
+        if ( defined( 'WORDLIFT_BATCH' ) && WORDLIFT_BATCH ) {
1200
+            // Add the functionality only if a flag is set in wp-config.php .
1201
+            $this->loader->add_action( 'wl_admin_menu', $this->batch_analysis_page, 'admin_menu', 10, 2 );
1202
+        }
1203 1203
 
1204
-		// Hook key update.
1205
-		$this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1206
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1204
+        // Hook key update.
1205
+        $this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1206
+        $this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1207 1207
 
1208
-		// Add additional action links to the WordLift plugin in the plugins page.
1209
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1208
+        // Add additional action links to the WordLift plugin in the plugins page.
1209
+        $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1210 1210
 
1211
-		// Hook the AJAX `wl_publisher` action name.
1212
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1211
+        // Hook the AJAX `wl_publisher` action name.
1212
+        $this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1213 1213
 
1214
-		// Hook row actions for the entity type list admin.
1215
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1214
+        // Hook row actions for the entity type list admin.
1215
+        $this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1216 1216
 
1217
-		// Hook capabilities manipulation to allow access to entity type admin
1218
-		// page  on wordpress versions before 4.7.
1219
-		global $wp_version;
1220
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1221
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1222
-		}
1217
+        // Hook capabilities manipulation to allow access to entity type admin
1218
+        // page  on wordpress versions before 4.7.
1219
+        global $wp_version;
1220
+        if ( version_compare( $wp_version, '4.7', '<' ) ) {
1221
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1222
+        }
1223 1223
 
1224
-		/** Adapters. */
1225
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1224
+        /** Adapters. */
1225
+        $this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1226 1226
 
1227
-		$this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1227
+        $this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1228 1228
 
1229
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' );
1230
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' );
1229
+        $this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' );
1230
+        $this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' );
1231 1231
 
1232
-		// Hooks to restrict multisite super admin from manipulating entity types.
1233
-		if ( is_multisite() ) {
1234
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1235
-		}
1236
-	}
1232
+        // Hooks to restrict multisite super admin from manipulating entity types.
1233
+        if ( is_multisite() ) {
1234
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1235
+        }
1236
+    }
1237 1237
 
1238
-	/**
1239
-	 * Register all of the hooks related to the public-facing functionality
1240
-	 * of the plugin.
1241
-	 *
1242
-	 * @since    1.0.0
1243
-	 * @access   private
1244
-	 */
1245
-	private function define_public_hooks() {
1238
+    /**
1239
+     * Register all of the hooks related to the public-facing functionality
1240
+     * of the plugin.
1241
+     *
1242
+     * @since    1.0.0
1243
+     * @access   private
1244
+     */
1245
+    private function define_public_hooks() {
1246 1246
 
1247
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1247
+        $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1248 1248
 
1249
-		// Register the entity post type.
1250
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1249
+        // Register the entity post type.
1250
+        $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1251 1251
 
1252
-		// Bind the link generation and handling hooks to the entity link service.
1253
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1254
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1255
-		$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 );
1256
-		$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 );
1252
+        // Bind the link generation and handling hooks to the entity link service.
1253
+        $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1254
+        $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1255
+        $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 );
1256
+        $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 );
1257 1257
 
1258
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1259
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1258
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1259
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1260 1260
 
1261
-		// Hook the content filter service to add entity links.
1262
-		$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1261
+        // Hook the content filter service to add entity links.
1262
+        $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1263 1263
 
1264
-		// Hook the AJAX wl_timeline action to the Timeline service.
1265
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1264
+        // Hook the AJAX wl_timeline action to the Timeline service.
1265
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1266 1266
 
1267
-		// Hook the ShareThis service.
1268
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1269
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1267
+        // Hook the ShareThis service.
1268
+        $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1269
+        $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1270 1270
 
1271
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1272
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1271
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1272
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1273 1273
 
1274
-		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1275
-		// in order to tweak WP's `WP_Query` to include entities in queries related
1276
-		// to categories.
1277
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1274
+        // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1275
+        // in order to tweak WP's `WP_Query` to include entities in queries related
1276
+        // to categories.
1277
+        $this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1278 1278
 
1279
-		/*
1279
+        /*
1280 1280
 		 * Hook the `pre_get_posts` action to the `Wordlift_Event_Entity_Page_Service`
1281 1281
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1282 1282
 		 * order of start time.
1283 1283
 		 */
1284
-		$this->loader->add_action( 'pre_get_posts', $this->event_entity_page_service, 'pre_get_posts', 10, 1 );
1285
-
1286
-		$this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1287
-
1288
-	}
1289
-
1290
-	/**
1291
-	 * Run the loader to execute all of the hooks with WordPress.
1292
-	 *
1293
-	 * @since    1.0.0
1294
-	 */
1295
-	public function run() {
1296
-		$this->loader->run();
1297
-	}
1298
-
1299
-	/**
1300
-	 * The name of the plugin used to uniquely identify it within the context of
1301
-	 * WordPress and to define internationalization functionality.
1302
-	 *
1303
-	 * @since     1.0.0
1304
-	 * @return    string    The name of the plugin.
1305
-	 */
1306
-	public function get_plugin_name() {
1307
-		return $this->plugin_name;
1308
-	}
1309
-
1310
-	/**
1311
-	 * The reference to the class that orchestrates the hooks with the plugin.
1312
-	 *
1313
-	 * @since     1.0.0
1314
-	 * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1315
-	 */
1316
-	public function get_loader() {
1317
-		return $this->loader;
1318
-	}
1319
-
1320
-	/**
1321
-	 * Retrieve the version number of the plugin.
1322
-	 *
1323
-	 * @since     1.0.0
1324
-	 * @return    string    The version number of the plugin.
1325
-	 */
1326
-	public function get_version() {
1327
-		return $this->version;
1328
-	}
1284
+        $this->loader->add_action( 'pre_get_posts', $this->event_entity_page_service, 'pre_get_posts', 10, 1 );
1285
+
1286
+        $this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1287
+
1288
+    }
1289
+
1290
+    /**
1291
+     * Run the loader to execute all of the hooks with WordPress.
1292
+     *
1293
+     * @since    1.0.0
1294
+     */
1295
+    public function run() {
1296
+        $this->loader->run();
1297
+    }
1298
+
1299
+    /**
1300
+     * The name of the plugin used to uniquely identify it within the context of
1301
+     * WordPress and to define internationalization functionality.
1302
+     *
1303
+     * @since     1.0.0
1304
+     * @return    string    The name of the plugin.
1305
+     */
1306
+    public function get_plugin_name() {
1307
+        return $this->plugin_name;
1308
+    }
1309
+
1310
+    /**
1311
+     * The reference to the class that orchestrates the hooks with the plugin.
1312
+     *
1313
+     * @since     1.0.0
1314
+     * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1315
+     */
1316
+    public function get_loader() {
1317
+        return $this->loader;
1318
+    }
1319
+
1320
+    /**
1321
+     * Retrieve the version number of the plugin.
1322
+     *
1323
+     * @since     1.0.0
1324
+     * @return    string    The version number of the plugin.
1325
+     */
1326
+    public function get_version() {
1327
+        return $this->version;
1328
+    }
1329 1329
 
1330 1330
 }
Please login to merge, or discard this patch.
Spacing   +202 added lines, -202 removed lines patch added patch discarded remove patch
@@ -592,337 +592,337 @@  discard block
 block discarded – undo
592 592
 		 * The class responsible for orchestrating the actions and filters of the
593 593
 		 * core plugin.
594 594
 		 */
595
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
595
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-loader.php';
596 596
 
597 597
 		/**
598 598
 		 * The class responsible for defining internationalization functionality
599 599
 		 * of the plugin.
600 600
 		 */
601
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
601
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-i18n.php';
602 602
 
603 603
 		/**
604 604
 		 * WordLift's supported languages.
605 605
 		 */
606
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
606
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-languages.php';
607 607
 
608 608
 		/**
609 609
 		 * Provide support functions to sanitize data.
610 610
 		 */
611
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
611
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sanitizer.php';
612 612
 
613 613
 		/**
614 614
 		 * The Redirect service.
615 615
 		 */
616
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
616
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-redirect-service.php';
617 617
 
618 618
 		/**
619 619
 		 * The Log service.
620 620
 		 */
621
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
621
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-log-service.php';
622 622
 
623 623
 		/**
624 624
 		 * The configuration service.
625 625
 		 */
626
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
626
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-configuration-service.php';
627 627
 
628 628
 		/**
629 629
 		 * The entity post type service (this is the WordPress post type, not the entity schema type).
630 630
 		 */
631
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
631
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-type-service.php';
632 632
 
633 633
 		/**
634 634
 		 * The entity type service (i.e. the schema type).
635 635
 		 */
636
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
636
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-service.php';
637 637
 
638 638
 		/**
639 639
 		 * The entity link service.
640 640
 		 */
641
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
641
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-link-service.php';
642 642
 
643 643
 		/**
644 644
 		 * The Query builder.
645 645
 		 */
646
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
646
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-query-builder.php';
647 647
 
648 648
 		/**
649 649
 		 * The Schema service.
650 650
 		 */
651
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
651
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-service.php';
652 652
 
653 653
 		/**
654 654
 		 * The schema:url property service.
655 655
 		 */
656
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
657
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
656
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-service.php';
657
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-url-property-service.php';
658 658
 
659 659
 		/**
660 660
 		 * The UI service.
661 661
 		 */
662
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
662
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-ui-service.php';
663 663
 
664 664
 		/**
665 665
 		 * The Thumbnail service.
666 666
 		 */
667
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
667
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-thumbnail-service.php';
668 668
 
669 669
 		/**
670 670
 		 * The Entity Types Taxonomy service.
671 671
 		 */
672
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
672
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-types-taxonomy-service.php';
673 673
 
674 674
 		/**
675 675
 		 * The Entity service.
676 676
 		 */
677
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
677
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-service.php';
678 678
 
679 679
 		// Add the entity rating service.
680
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
680
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-rating-service.php';
681 681
 
682 682
 		/**
683 683
 		 * The User service.
684 684
 		 */
685
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
685
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-user-service.php';
686 686
 
687 687
 		/**
688 688
 		 * The Timeline service.
689 689
 		 */
690
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
690
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-timeline-service.php';
691 691
 
692 692
 		/**
693 693
 		 * The Topic Taxonomy service.
694 694
 		 */
695
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
695
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-topic-taxonomy-service.php';
696 696
 
697 697
 		/**
698 698
 		 * The SPARQL service.
699 699
 		 */
700
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
700
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sparql-service.php';
701 701
 
702 702
 		/**
703 703
 		 * The WordLift import service.
704 704
 		 */
705
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
705
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-import-service.php';
706 706
 
707 707
 		/**
708 708
 		 * The WordLift URI service.
709 709
 		 */
710
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
710
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-uri-service.php';
711 711
 
712
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
712
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-listable.php';
713 713
 
714
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
714
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-factory.php';
715 715
 
716
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-service.php';
716
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sample-data-service.php';
717 717
 
718 718
 		/**
719 719
 		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
720 720
 		 */
721
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
721
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-rebuild-service.php';
722 722
 
723
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
723
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/properties/class-wordlift-property-getter-factory.php';
724 724
 
725
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
725
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-attachment-service.php';
726 726
 
727 727
 		/**
728 728
 		 * Load the converters.
729 729
 		 */
730
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
731
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
732
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
733
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
734
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
735
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-website-converter.php';
730
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/intf-wordlift-post-converter.php';
731
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
732
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-postid-to-jsonld-converter.php';
733
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-to-jsonld-converter.php';
734
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-to-jsonld-converter.php';
735
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-website-converter.php';
736 736
 
737 737
 		/**
738 738
 		 * Load the content filter.
739 739
 		 */
740
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
740
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-content-filter-service.php';
741 741
 
742 742
 		/*
743 743
 		 * Load the excerpt helper.
744 744
 		 */
745
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-excerpt-helper.php';
745
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-excerpt-helper.php';
746 746
 
747 747
 		/**
748 748
 		 * Load the JSON-LD service to publish entities using JSON-LD.s
749 749
 		 *
750 750
 		 * @since 3.8.0
751 751
 		 */
752
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
752
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-service.php';
753 753
 
754 754
 		// The Publisher Service and the AJAX adapter.
755
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
756
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
755
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-service.php';
756
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-ajax-adapter.php';
757 757
 
758
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-adapter.php';
758
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-adapter.php';
759 759
 
760 760
 		/**
761 761
 		 * Load the WordLift key validation service.
762 762
 		 */
763
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
763
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-key-validation-service.php';
764 764
 
765 765
 		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
766
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
766
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-category-taxonomy-service.php';
767 767
 
768 768
 		// Load the `Wordlift_Event_Entity_Page_Service` class definition.
769
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-event-entity-page-service.php';
770
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-batch-analysis-service.php';
769
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-event-entity-page-service.php';
770
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-batch-analysis-service.php';
771 771
 
772 772
 		/** Adapters. */
773
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
774
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-newrelic-adapter.php';
775
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sample-data-ajax-adapter.php';
773
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-tinymce-adapter.php';
774
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-newrelic-adapter.php';
775
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sample-data-ajax-adapter.php';
776 776
 
777 777
 		/** Async Tasks. */
778
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/wp-async-task.php';
779
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
778
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/wp-async-task/wp-async-task.php';
779
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/wp-async-task/class-wordlift-sparql-query-async-task.php';
780 780
 
781 781
 		/**
782 782
 		 * The class responsible for defining all actions that occur in the admin area.
783 783
 		 */
784
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
784
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin.php';
785 785
 
786 786
 		/**
787 787
 		 * The class to customize the entity list admin page.
788 788
 		 */
789
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
789
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-list.php';
790 790
 
791 791
 		/**
792 792
 		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
793 793
 		 */
794
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
794
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-types-taxonomy-walker.php';
795 795
 
796 796
 		/**
797 797
 		 * The Notice service.
798 798
 		 */
799
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
799
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-notice-service.php';
800 800
 
801 801
 		/**
802 802
 		 * The PrimaShop adapter.
803 803
 		 */
804
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
804
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-primashop-adapter.php';
805 805
 
806 806
 		/**
807 807
 		 * The WordLift Dashboard service.
808 808
 		 */
809
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
809
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-dashboard.php';
810 810
 
811 811
 		/**
812 812
 		 * The admin 'Install wizard' page.
813 813
 		 */
814
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
814
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-setup.php';
815 815
 
816 816
 		/**
817 817
 		 * The WordLift entity type list admin page controller.
818 818
 		 */
819
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
819
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
820 820
 
821 821
 		/**
822 822
 		 * The WordLift entity type settings admin page controller.
823 823
 		 */
824
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
824
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-type-settings.php';
825 825
 
826 826
 		/**
827 827
 		 * The admin 'Download Your Data' page.
828 828
 		 */
829
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
829
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-download-your-data-page.php';
830 830
 
831 831
 		/**
832 832
 		 * The admin 'Download Your Data' page.
833 833
 		 */
834
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
834
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-download-your-data-page.php';
835 835
 
836 836
 		/**
837 837
 		 * The admin 'WordLift Settings' page.
838 838
 		 */
839
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
840
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
841
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-radio-element.php';
842
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
843
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
844
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
845
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-author-element.php';
846
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
847
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
848
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
849
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-batch-analysis-page.php';
850
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
839
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/intf-wordlift-admin-element.php';
840
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-input-element.php';
841
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-input-radio-element.php';
842
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-select2-element.php';
843
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-language-select-element.php';
844
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-tabs-element.php';
845
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-author-element.php';
846
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-publisher-element.php';
847
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-page.php';
848
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page.php';
849
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-batch-analysis-page.php';
850
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page-action-link.php';
851 851
 
852 852
 		/** Admin Pages */
853
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
854
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-user-profile-page.php';
855
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
853
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-post-edit-page.php';
854
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-user-profile-page.php';
855
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-status-page.php';
856 856
 
857 857
 		/**
858 858
 		 * The class responsible for defining all actions that occur in the public-facing
859 859
 		 * side of the site.
860 860
 		 */
861
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
861
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-public.php';
862 862
 
863 863
 		/**
864 864
 		 * The shortcode abstract class.
865 865
 		 */
866
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
866
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-shortcode.php';
867 867
 
868 868
 		/**
869 869
 		 * The Timeline shortcode.
870 870
 		 */
871
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
871
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-timeline-shortcode.php';
872 872
 
873 873
 		/**
874 874
 		 * The Navigator shortcode.
875 875
 		 */
876
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
876
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-navigator-shortcode.php';
877 877
 
878 878
 		/**
879 879
 		 * The chord shortcode.
880 880
 		 */
881
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
881
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-chord-shortcode.php';
882 882
 
883 883
 		/**
884 884
 		 * The geomap shortcode.
885 885
 		 */
886
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
886
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-geomap-shortcode.php';
887 887
 
888 888
 		/**
889 889
 		 * The entity cloud shortcode.
890 890
 		 */
891
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
891
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-shortcode.php';
892 892
 
893 893
 		/**
894 894
 		 * The ShareThis service.
895 895
 		 */
896
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
896
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-sharethis-service.php';
897 897
 
898 898
 		/**
899 899
 		 * The SEO service.
900 900
 		 */
901
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
901
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-seo-service.php';
902 902
 
903 903
 		/**
904 904
 		 * The AMP service.
905 905
 		 */
906
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-amp-service.php';
906
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-amp-service.php';
907 907
 
908 908
 		/** Widgets */
909
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
910
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
909
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-widget.php';
910
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-widget.php';
911 911
 
912 912
 		$this->loader = new Wordlift_Loader();
913 913
 
914 914
 		// Instantiate a global logger.
915 915
 		global $wl_logger;
916
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
916
+		$wl_logger = Wordlift_Log_Service::get_logger('WordLift');
917 917
 
918 918
 		// Create the configuration service.
919 919
 		$this->configuration_service = new Wordlift_Configuration_Service();
920 920
 
921 921
 		// Create an entity type service instance. It'll be later bound to the init action.
922
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
922
+		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service(Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path());
923 923
 
924 924
 		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
925
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
925
+		$this->entity_link_service = new Wordlift_Entity_Link_Service($this->entity_post_type_service, $this->configuration_service->get_entity_base_path());
926 926
 
927 927
 		// Create an instance of the UI service.
928 928
 		$this->ui_service = new Wordlift_UI_Service();
@@ -933,23 +933,23 @@  discard block
 block discarded – undo
933 933
 		$this->sparql_service = new Wordlift_Sparql_Service();
934 934
 
935 935
 		// Create an instance of the Schema service.
936
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
936
+		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service($this->sparql_service);
937 937
 		$this->schema_service        = new Wordlift_Schema_Service();
938 938
 
939 939
 		// Create an instance of the Notice service.
940 940
 		$this->notice_service = new Wordlift_Notice_Service();
941 941
 
942 942
 		// Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
943
-		$this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
943
+		$this->entity_service = new Wordlift_Entity_Service($this->ui_service);
944 944
 
945 945
 		// Create an instance of the User service.
946 946
 		$this->user_service = new Wordlift_User_Service();
947 947
 
948 948
 		// Create a new instance of the Timeline service and Timeline shortcode.
949
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
949
+		$this->timeline_service = new Wordlift_Timeline_Service($this->entity_service);
950 950
 
951 951
 		// Create a new instance of the Redirect service.
952
-		$this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
952
+		$this->redirect_service = new Wordlift_Redirect_Service($this->entity_service);
953 953
 
954 954
 		// Initialize the shortcodes.
955 955
 		new Wordlift_Navigator_Shortcode();
@@ -964,7 +964,7 @@  discard block
 block discarded – undo
964 964
 		// Initialize the AMP service.
965 965
 		new Wordlift_AMP_Service();
966 966
 
967
-		$this->batch_analysis_service = new Wordlift_Batch_Analysis_Service( $this, $this->configuration_service );
967
+		$this->batch_analysis_service = new Wordlift_Batch_Analysis_Service($this, $this->configuration_service);
968 968
 
969 969
 		$this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
970 970
 
@@ -977,49 +977,49 @@  discard block
 block discarded – undo
977 977
 		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
978 978
 
979 979
 		// Create an import service instance to hook later to WP's import function.
980
-		$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() );
980
+		$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());
981 981
 
982
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
982
+		$uri_service = new Wordlift_Uri_Service($GLOBALS['wpdb']);
983 983
 
984 984
 		// Create a Rebuild Service instance, which we'll later bound to an ajax call.
985
-		$this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
985
+		$this->rebuild_service = new Wordlift_Rebuild_Service($this->sparql_service, $uri_service);
986 986
 
987
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
987
+		$this->entity_type_service = new Wordlift_Entity_Type_Service($this->schema_service);
988 988
 
989 989
 		// Create the entity rating service.
990
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
990
+		$this->rating_service = new Wordlift_Rating_Service($this->entity_service, $this->entity_type_service, $this->notice_service);
991 991
 
992 992
 		// Create entity list customization (wp-admin/edit.php)
993
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
993
+		$this->entity_list_service = new Wordlift_Entity_List_Service($this->rating_service);
994 994
 
995 995
 		// Create a new instance of the Redirect service.
996
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
996
+		$this->dashboard_service = new Wordlift_Dashboard_Service($this->rating_service);
997 997
 
998
-		$this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
999
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
998
+		$this->property_factory = new Wordlift_Property_Factory($schema_url_property_service);
999
+		$this->property_factory->register(Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service);
1000 1000
 
1001 1001
 		$attachment_service = new Wordlift_Attachment_Service();
1002 1002
 
1003 1003
 		// Instantiate the JSON-LD service.
1004
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
1005
-		$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 );
1006
-		$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, $this->entity_post_to_jsonld_converter );
1007
-		$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 );
1008
-		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter( $this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service, $this->entity_post_to_jsonld_converter );
1009
-		$this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter, $this->jsonld_website_converter );
1004
+		$property_getter                       = Wordlift_Property_Getter_Factory::create($this->entity_service);
1005
+		$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);
1006
+		$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, $this->entity_post_to_jsonld_converter);
1007
+		$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);
1008
+		$this->jsonld_website_converter        = new Wordlift_Website_Jsonld_Converter($this->entity_type_service, $this->entity_service, $this->user_service, $attachment_service, $this->configuration_service, $this->entity_post_to_jsonld_converter);
1009
+		$this->jsonld_service                  = new Wordlift_Jsonld_Service($this->entity_service, $this->postid_to_jsonld_converter, $this->jsonld_website_converter);
1010 1010
 
1011 1011
 		// Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins).
1012
-		$this->key_validation_service = new Wordlift_Key_Validation_Service( $this->configuration_service );
1012
+		$this->key_validation_service = new Wordlift_Key_Validation_Service($this->configuration_service);
1013 1013
 
1014 1014
 		// Create an instance of the Publisher Service and the AJAX Adapter.
1015 1015
 		$publisher_service            = new Wordlift_Publisher_Service();
1016
-		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
1016
+		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter($publisher_service);
1017 1017
 
1018
-		$this->sample_data_service      = new Wordlift_Sample_Data_Service( $this->entity_type_service, $this->configuration_service );
1019
-		$this->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter( $this->sample_data_service );
1018
+		$this->sample_data_service      = new Wordlift_Sample_Data_Service($this->entity_type_service, $this->configuration_service);
1019
+		$this->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter($this->sample_data_service);
1020 1020
 
1021 1021
 		/** Adapters. */
1022
-		$this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this );
1022
+		$this->tinymce_adapter = new Wordlift_Tinymce_Adapter($this);
1023 1023
 
1024 1024
 		/** Async Tasks. */
1025 1025
 		new Wordlift_Sparql_Query_Async_Task();
@@ -1032,16 +1032,16 @@  discard block
 block discarded – undo
1032 1032
 		$this->select2_element         = new Wordlift_Admin_Select2_Element();
1033 1033
 		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
1034 1034
 		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
1035
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
1036
-		$this->author_element          = new Wordlift_Admin_Author_Element( $publisher_service, $this->select2_element );
1035
+		$this->publisher_element       = new Wordlift_Admin_Publisher_Element($this->configuration_service, $publisher_service, $tabs_element, $this->select2_element);
1036
+		$this->author_element          = new Wordlift_Admin_Author_Element($publisher_service, $this->select2_element);
1037 1037
 
1038
-		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1039
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element, $this->radio_input_element );
1040
-		$this->batch_analysis_page       = new Wordlift_Batch_Analysis_Page( $this->batch_analysis_service );
1041
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
1038
+		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page($this->configuration_service);
1039
+		$this->settings_page             = new Wordlift_Admin_Settings_Page($this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element, $this->radio_input_element);
1040
+		$this->batch_analysis_page       = new Wordlift_Batch_Analysis_Page($this->batch_analysis_service);
1041
+		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link($this->settings_page);
1042 1042
 
1043 1043
 		// Pages.
1044
-		new Wordlift_Admin_Post_Edit_Page( $this );
1044
+		new Wordlift_Admin_Post_Edit_Page($this);
1045 1045
 
1046 1046
 		// create an instance of the entity type list admin page controller.
1047 1047
 		$this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
@@ -1053,26 +1053,26 @@  discard block
 block discarded – undo
1053 1053
 		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
1054 1054
 
1055 1055
 		//** WordPress Admin */
1056
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
1057
-		$this->status_page             = new Wordlift_Admin_Status_Page( $this->entity_service, $this->sparql_service );
1056
+		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page($this->configuration_service);
1057
+		$this->status_page             = new Wordlift_Admin_Status_Page($this->entity_service, $this->sparql_service);
1058 1058
 
1059 1059
 		// Create an instance of the install wizard.
1060
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
1060
+		$this->admin_setup = new Wordlift_Admin_Setup($this->configuration_service, $this->key_validation_service, $this->entity_service);
1061 1061
 
1062 1062
 		// Create an instance of the content filter service.
1063
-		$this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service, $this->configuration_service );
1063
+		$this->content_filter_service = new Wordlift_Content_Filter_Service($this->entity_service, $this->configuration_service);
1064 1064
 
1065
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
1065
+		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service($this->entity_post_type_service);
1066 1066
 
1067 1067
 		// User Profile.
1068
-		new Wordlift_Admin_User_Profile_Page( $this->author_element, $this->user_service );
1068
+		new Wordlift_Admin_User_Profile_Page($this->author_element, $this->user_service);
1069 1069
 
1070 1070
 		$this->event_entity_page_service = new Wordlift_Event_Entity_Page_Service();
1071 1071
 
1072 1072
 		// Load the debug service if WP is in debug mode.
1073
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
1074
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
1075
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
1073
+		if (defined('WP_DEBUG') && WP_DEBUG) {
1074
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-debug-service.php';
1075
+			new Wordlift_Debug_Service($this->entity_service, $uri_service);
1076 1076
 		}
1077 1077
 
1078 1078
 	}
@@ -1089,9 +1089,9 @@  discard block
 block discarded – undo
1089 1089
 	private function set_locale() {
1090 1090
 
1091 1091
 		$plugin_i18n = new Wordlift_i18n();
1092
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
1092
+		$plugin_i18n->set_domain($this->get_plugin_name());
1093 1093
 
1094
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
1094
+		$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
1095 1095
 
1096 1096
 	}
1097 1097
 
@@ -1112,126 +1112,126 @@  discard block
 block discarded – undo
1112 1112
 			$this->user_service
1113 1113
 		);
1114 1114
 
1115
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
1116
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
1115
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
1116
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
1117 1117
 
1118 1118
 		// Hook the init action to the Topic Taxonomy service.
1119
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
1119
+		$this->loader->add_action('init', $this->topic_taxonomy_service, 'init', 0);
1120 1120
 
1121 1121
 		// Hook the deleted_post_meta action to the Thumbnail service.
1122
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
1122
+		$this->loader->add_action('deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4);
1123 1123
 
1124 1124
 		// Hook the added_post_meta action to the Thumbnail service.
1125
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1125
+		$this->loader->add_action('added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4);
1126 1126
 
1127 1127
 		// Hook the updated_post_meta action to the Thumbnail service.
1128
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1128
+		$this->loader->add_action('updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4);
1129 1129
 
1130 1130
 		// Hook posts inserts (or updates) to the user service.
1131
-		$this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1131
+		$this->loader->add_action('wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3);
1132 1132
 
1133 1133
 		// Hook the AJAX wl_timeline action to the Timeline service.
1134
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1134
+		$this->loader->add_action('wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline');
1135 1135
 
1136 1136
 		// Register custom allowed redirect hosts.
1137
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1137
+		$this->loader->add_filter('allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts');
1138 1138
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1139
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1139
+		$this->loader->add_action('wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect');
1140 1140
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1141
-		$this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1141
+		$this->loader->add_action('wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats');
1142 1142
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1143
-		$this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1143
+		$this->loader->add_action('wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets');
1144 1144
 
1145 1145
 		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1146 1146
 		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1147
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1148
-		$this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1147
+		$this->loader->add_action('save_post', $this->entity_service, 'save_post', 9, 3);
1148
+		$this->loader->add_action('save_post_entity', $this->rating_service, 'set_rating_for', 10, 1);
1149 1149
 
1150
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1151
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1150
+		$this->loader->add_action('edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1);
1151
+		$this->loader->add_action('in_admin_header', $this->rating_service, 'in_admin_header');
1152 1152
 
1153 1153
 		// Entity listing customization (wp-admin/edit.php)
1154 1154
 		// Add custom columns
1155
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1156
-		$this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1155
+		$this->loader->add_filter('manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns');
1156
+		$this->loader->add_filter('manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2);
1157 1157
 		// Add 4W selection
1158
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1159
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1158
+		$this->loader->add_action('restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope');
1159
+		$this->loader->add_filter('posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope');
1160 1160
 
1161
-		$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1161
+		$this->loader->add_filter('wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args');
1162 1162
 
1163 1163
 		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1164 1164
 		// entities.
1165
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1165
+		$this->loader->add_filter('prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2);
1166 1166
 
1167 1167
 		// Filter imported post meta.
1168
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1168
+		$this->loader->add_filter('wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3);
1169 1169
 
1170 1170
 		// Notify the import service when an import starts and ends.
1171
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1172
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1171
+		$this->loader->add_action('import_start', $this->import_service, 'import_start', 10, 0);
1172
+		$this->loader->add_action('import_end', $this->import_service, 'import_end', 10, 0);
1173 1173
 
1174 1174
 		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1175
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1175
+		$this->loader->add_action('wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild');
1176 1176
 
1177 1177
 		// Hook the menu to the Download Your Data page.
1178
-		$this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1179
-		$this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1180
-		$this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1178
+		$this->loader->add_action('admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0);
1179
+		$this->loader->add_action('admin_menu', $this->status_page, 'admin_menu', 100, 0);
1180
+		$this->loader->add_action('admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0);
1181 1181
 
1182 1182
 		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1183
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1183
+		$this->loader->add_action('wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10);
1184 1184
 
1185 1185
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1186
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1186
+		$this->loader->add_action('wp_ajax_wl_jsonld', $this->jsonld_service, 'get');
1187 1187
 
1188 1188
 		// Hook the AJAX wl_validate_key action to the Key Validation service.
1189
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1189
+		$this->loader->add_action('wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key');
1190 1190
 
1191 1191
 		// Hook the `admin_init` function to the Admin Setup.
1192
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1192
+		$this->loader->add_action('admin_init', $this->admin_setup, 'admin_init');
1193 1193
 
1194 1194
 		// Hook the admin_init to the settings page.
1195
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1195
+		$this->loader->add_action('admin_init', $this->settings_page, 'admin_init');
1196 1196
 
1197 1197
 		// Hook the menu creation on the general wordlift menu creation
1198
-		$this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1199
-		if ( defined( 'WORDLIFT_BATCH' ) && WORDLIFT_BATCH ) {
1198
+		$this->loader->add_action('wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2);
1199
+		if (defined('WORDLIFT_BATCH') && WORDLIFT_BATCH) {
1200 1200
 			// Add the functionality only if a flag is set in wp-config.php .
1201
-			$this->loader->add_action( 'wl_admin_menu', $this->batch_analysis_page, 'admin_menu', 10, 2 );
1201
+			$this->loader->add_action('wl_admin_menu', $this->batch_analysis_page, 'admin_menu', 10, 2);
1202 1202
 		}
1203 1203
 
1204 1204
 		// Hook key update.
1205
-		$this->loader->add_action( 'pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2 );
1206
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1205
+		$this->loader->add_action('pre_update_option_wl_general_settings', $this->configuration_service, 'maybe_update_dataset_uri', 10, 2);
1206
+		$this->loader->add_action('update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2);
1207 1207
 
1208 1208
 		// Add additional action links to the WordLift plugin in the plugins page.
1209
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1209
+		$this->loader->add_filter('plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1);
1210 1210
 
1211 1211
 		// Hook the AJAX `wl_publisher` action name.
1212
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1212
+		$this->loader->add_action('wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher');
1213 1213
 
1214 1214
 		// Hook row actions for the entity type list admin.
1215
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1215
+		$this->loader->add_filter('wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2);
1216 1216
 
1217 1217
 		// Hook capabilities manipulation to allow access to entity type admin
1218 1218
 		// page  on wordpress versions before 4.7.
1219 1219
 		global $wp_version;
1220
-		if ( version_compare( $wp_version, '4.7', '<' ) ) {
1221
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4 );
1220
+		if (version_compare($wp_version, '4.7', '<')) {
1221
+			$this->loader->add_filter('map_meta_cap', $this->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 4);
1222 1222
 		}
1223 1223
 
1224 1224
 		/** Adapters. */
1225
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1225
+		$this->loader->add_filter('mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1);
1226 1226
 
1227
-		$this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1227
+		$this->loader->add_action('wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1);
1228 1228
 
1229
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create' );
1230
-		$this->loader->add_action( 'wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete' );
1229
+		$this->loader->add_action('wp_ajax_wl_sample_data_create', $this->sample_data_ajax_adapter, 'create');
1230
+		$this->loader->add_action('wp_ajax_wl_sample_data_delete', $this->sample_data_ajax_adapter, 'delete');
1231 1231
 
1232 1232
 		// Hooks to restrict multisite super admin from manipulating entity types.
1233
-		if ( is_multisite() ) {
1234
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1233
+		if (is_multisite()) {
1234
+			$this->loader->add_filter('map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4);
1235 1235
 		}
1236 1236
 	}
1237 1237
 
@@ -1244,46 +1244,46 @@  discard block
 block discarded – undo
1244 1244
 	 */
1245 1245
 	private function define_public_hooks() {
1246 1246
 
1247
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1247
+		$plugin_public = new Wordlift_Public($this->get_plugin_name(), $this->get_version());
1248 1248
 
1249 1249
 		// Register the entity post type.
1250
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1250
+		$this->loader->add_action('init', $this->entity_post_type_service, 'register');
1251 1251
 
1252 1252
 		// Bind the link generation and handling hooks to the entity link service.
1253
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1254
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 );
1255
-		$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 );
1256
-		$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 );
1253
+		$this->loader->add_filter('post_type_link', $this->entity_link_service, 'post_type_link', 10, 4);
1254
+		$this->loader->add_action('pre_get_posts', $this->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1);
1255
+		$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);
1256
+		$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);
1257 1257
 
1258
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1259
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1258
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
1259
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
1260 1260
 
1261 1261
 		// Hook the content filter service to add entity links.
1262
-		$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1262
+		$this->loader->add_filter('the_content', $this->content_filter_service, 'the_content');
1263 1263
 
1264 1264
 		// Hook the AJAX wl_timeline action to the Timeline service.
1265
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1265
+		$this->loader->add_action('wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline');
1266 1266
 
1267 1267
 		// Hook the ShareThis service.
1268
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1269
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1268
+		$this->loader->add_filter('the_content', $this->sharethis_service, 'the_content', 99);
1269
+		$this->loader->add_filter('the_excerpt', $this->sharethis_service, 'the_excerpt', 99);
1270 1270
 
1271 1271
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1272
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1272
+		$this->loader->add_action('wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get');
1273 1273
 
1274 1274
 		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1275 1275
 		// in order to tweak WP's `WP_Query` to include entities in queries related
1276 1276
 		// to categories.
1277
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1277
+		$this->loader->add_action('pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1);
1278 1278
 
1279 1279
 		/*
1280 1280
 		 * Hook the `pre_get_posts` action to the `Wordlift_Event_Entity_Page_Service`
1281 1281
 		 * in order to tweak WP's `WP_Query` to show event related entities in reverse
1282 1282
 		 * order of start time.
1283 1283
 		 */
1284
-		$this->loader->add_action( 'pre_get_posts', $this->event_entity_page_service, 'pre_get_posts', 10, 1 );
1284
+		$this->loader->add_action('pre_get_posts', $this->event_entity_page_service, 'pre_get_posts', 10, 1);
1285 1285
 
1286
-		$this->loader->add_action( 'wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1 );
1286
+		$this->loader->add_action('wp_async_wl_run_sparql_query', $this->sparql_service, 'run_sparql_query', 10, 1);
1287 1287
 
1288 1288
 	}
1289 1289
 
Please login to merge, or discard this patch.