Completed
Push — develop ( 0accb6...a437a9 )
by David
03:17
created
src/wordlift.php 1 patch
Spacing   +152 added lines, -152 removed lines patch added patch discarded remove patch
@@ -25,15 +25,15 @@  discard block
 block discarded – undo
25 25
  */
26 26
 
27 27
 // If this file is called directly, abort.
28
-if ( ! defined( 'WPINC' ) ) {
28
+if ( ! defined('WPINC')) {
29 29
 	die;
30 30
 }
31 31
 
32 32
 // Include WordLift constants.
33
-require_once( 'wordlift_constants.php' );
33
+require_once('wordlift_constants.php');
34 34
 
35 35
 // Load modules
36
-require_once( 'modules/core/wordlift_core.php' );
36
+require_once('modules/core/wordlift_core.php');
37 37
 
38 38
 /**
39 39
  * Log to the debug.log file.
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
  *
47 47
  * @param string|mixed $log The log data.
48 48
  */
49
-function wl_write_log( $log ) {
49
+function wl_write_log($log) {
50 50
 
51
-	Wordlift_Log_Service::get_instance()->info( $log );
51
+	Wordlift_Log_Service::get_instance()->info($log);
52 52
 
53 53
 //	$handler = apply_filters( 'wl_write_log_handler', null );
54 54
 //
@@ -74,19 +74,19 @@  discard block
 block discarded – undo
74 74
  * @param string|array $log    The log data.
75 75
  * @param string       $caller The calling function.
76 76
  */
77
-function wl_write_log_handler( $log, $caller = null ) {
77
+function wl_write_log_handler($log, $caller = null) {
78 78
 
79 79
 	global $wl_logger;
80 80
 
81
-	if ( true === WP_DEBUG ) {
81
+	if (true === WP_DEBUG) {
82 82
 
83
-		$message = ( isset( $caller ) ? sprintf( '[%-40.40s] ', $caller ) : '' ) .
84
-		           ( is_array( $log ) || is_object( $log ) ? print_r( $log, true ) : wl_write_log_hide_key( $log ) );
83
+		$message = (isset($caller) ? sprintf('[%-40.40s] ', $caller) : '').
84
+		           (is_array($log) || is_object($log) ? print_r($log, true) : wl_write_log_hide_key($log));
85 85
 
86
-		if ( isset( $wl_logger ) ) {
87
-			$wl_logger->info( $message );
86
+		if (isset($wl_logger)) {
87
+			$wl_logger->info($message);
88 88
 		} else {
89
-			error_log( $message );
89
+			error_log($message);
90 90
 		}
91 91
 
92 92
 	}
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
  *
105 105
  * @return string A text with the key hidden.
106 106
  */
107
-function wl_write_log_hide_key( $text ) {
107
+function wl_write_log_hide_key($text) {
108 108
 
109
-	return str_ireplace( wl_configuration_get_key(), '<hidden>', $text );
109
+	return str_ireplace(wl_configuration_get_key(), '<hidden>', $text);
110 110
 }
111 111
 
112 112
 /**
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
  *
117 117
  * @param string $query A SPARQL query.
118 118
  */
119
-function wl_queue_sparql_update_query( $query ) {
119
+function wl_queue_sparql_update_query($query) {
120 120
 
121
-	$filename = WL_TEMP_DIR . WL_REQUEST_ID . '.sparql';
122
-	file_put_contents( $filename, $query . "\n", FILE_APPEND );
121
+	$filename = WL_TEMP_DIR.WL_REQUEST_ID.'.sparql';
122
+	file_put_contents($filename, $query."\n", FILE_APPEND);
123 123
 
124
-	wl_write_log( "wl_queue_sparql_update_query [ filename :: $filename ]" );
124
+	wl_write_log("wl_queue_sparql_update_query [ filename :: $filename ]");
125 125
 }
126 126
 
127 127
 /**
@@ -129,33 +129,33 @@  discard block
 block discarded – undo
129 129
  *
130 130
  * @param int $request_id The request ID.
131 131
  */
132
-function wl_execute_saved_sparql_update_query( $request_id ) {
132
+function wl_execute_saved_sparql_update_query($request_id) {
133 133
 
134
-	$filename = WL_TEMP_DIR . $request_id . '.sparql';
134
+	$filename = WL_TEMP_DIR.$request_id.'.sparql';
135 135
 
136 136
 	// If the file doesn't exist, exit.
137
-	if ( ! file_exists( $filename ) ) {
138
-		wl_write_log( "wl_execute_saved_sparql_update_query : file doesn't exist [ filename :: $filename ]" );
137
+	if ( ! file_exists($filename)) {
138
+		wl_write_log("wl_execute_saved_sparql_update_query : file doesn't exist [ filename :: $filename ]");
139 139
 
140 140
 		return;
141 141
 	}
142 142
 
143
-	wl_write_log( "wl_execute_saved_sparql_update_query [ filename :: $filename ]" );
143
+	wl_write_log("wl_execute_saved_sparql_update_query [ filename :: $filename ]");
144 144
 
145 145
 	// Get the query saved in the file.
146
-	$query = file_get_contents( $filename );
146
+	$query = file_get_contents($filename);
147 147
 
148 148
 	// Execute the SPARQL query.
149
-	rl_execute_sparql_update_query( $query, false );
149
+	rl_execute_sparql_update_query($query, false);
150 150
 
151 151
 	// Reindex the triple store.
152 152
 	wordlift_reindex_triple_store();
153 153
 
154 154
 	// Delete the temporary file.
155
-	unlink( $filename );
155
+	unlink($filename);
156 156
 }
157 157
 
158
-add_action( 'wl_execute_saved_sparql_update_query', 'wl_execute_saved_sparql_update_query', 10, 1 );
158
+add_action('wl_execute_saved_sparql_update_query', 'wl_execute_saved_sparql_update_query', 10, 1);
159 159
 
160 160
 ///**
161 161
 // * Add buttons hook for the TinyMCE editor. This method is called by the WP init hook.
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 function wordlift_allowed_post_tags() {
198 198
 	global $allowedposttags;
199 199
 
200
-	$tags           = array( 'span' );
200
+	$tags           = array('span');
201 201
 	$new_attributes = array(
202 202
 		'itemscope' => array(),
203 203
 		'itemtype'  => array(),
@@ -205,9 +205,9 @@  discard block
 block discarded – undo
205 205
 		'itemid'    => array(),
206 206
 	);
207 207
 
208
-	foreach ( $tags as $tag ) {
209
-		if ( isset( $allowedposttags[ $tag ] ) && is_array( $allowedposttags[ $tag ] ) ) {
210
-			$allowedposttags[ $tag ] = array_merge( $allowedposttags[ $tag ], $new_attributes );
208
+	foreach ($tags as $tag) {
209
+		if (isset($allowedposttags[$tag]) && is_array($allowedposttags[$tag])) {
210
+			$allowedposttags[$tag] = array_merge($allowedposttags[$tag], $new_attributes);
211 211
 		}
212 212
 	}
213 213
 }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 //add_action( 'init', 'wordlift_buttonhooks' );
217 217
 
218 218
 // add allowed post tags.
219
-add_action( 'init', 'wordlift_allowed_post_tags' );
219
+add_action('init', 'wordlift_allowed_post_tags');
220 220
 
221 221
 
222 222
 /**
@@ -225,30 +225,30 @@  discard block
 block discarded – undo
225 225
 function wordlift_admin_enqueue_scripts() {
226 226
 
227 227
 	// Added for compatibility with WordPress 3.9 (see http://make.wordpress.org/core/2014/04/16/jquery-ui-and-wpdialogs-in-wordpress-3-9/)
228
-	wp_enqueue_script( 'wpdialogs' );
229
-	wp_enqueue_style( 'wp-jquery-ui-dialog' );
228
+	wp_enqueue_script('wpdialogs');
229
+	wp_enqueue_style('wp-jquery-ui-dialog');
230 230
 
231
-	wp_enqueue_style( 'wordlift-reloaded', plugin_dir_url( __FILE__ ) . 'css/wordlift-reloaded.min.css' );
231
+	wp_enqueue_style('wordlift-reloaded', plugin_dir_url(__FILE__).'css/wordlift-reloaded.min.css');
232 232
 
233
-	wp_enqueue_script( 'jquery-ui-autocomplete' );
234
-	wp_enqueue_script( 'angularjs', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js' );
235
-	wp_enqueue_script( 'angularjs-geolocation', plugin_dir_url( __FILE__ ) . '/bower_components/angularjs-geolocation/dist/angularjs-geolocation.min.js' );
236
-	wp_enqueue_script( 'angularjs-touch', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-touch.min.js' );
237
-	wp_enqueue_script( 'angularjs-animate', 'https://code.angularjs.org/1.3.11/angular-animate.min.js' );
233
+	wp_enqueue_script('jquery-ui-autocomplete');
234
+	wp_enqueue_script('angularjs', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular.min.js');
235
+	wp_enqueue_script('angularjs-geolocation', plugin_dir_url(__FILE__).'/bower_components/angularjs-geolocation/dist/angularjs-geolocation.min.js');
236
+	wp_enqueue_script('angularjs-touch', 'https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.11/angular-touch.min.js');
237
+	wp_enqueue_script('angularjs-animate', 'https://code.angularjs.org/1.3.11/angular-animate.min.js');
238 238
 
239 239
 	// Disable auto-save for custom entity posts only
240
-	if ( Wordlift_Entity_Service::TYPE_NAME === get_post_type() ) {
241
-		wp_dequeue_script( 'autosave' );
240
+	if (Wordlift_Entity_Service::TYPE_NAME === get_post_type()) {
241
+		wp_dequeue_script('autosave');
242 242
 	}
243 243
 }
244 244
 
245
-add_action( 'admin_enqueue_scripts', 'wordlift_admin_enqueue_scripts' );
245
+add_action('admin_enqueue_scripts', 'wordlift_admin_enqueue_scripts');
246 246
 
247 247
 function wl_enqueue_scripts() {
248
-	wp_enqueue_style( 'wordlift-ui', plugin_dir_url( __FILE__ ) . 'css/wordlift-ui.min.css' );
248
+	wp_enqueue_style('wordlift-ui', plugin_dir_url(__FILE__).'css/wordlift-ui.min.css');
249 249
 }
250 250
 
251
-add_action( 'wp_enqueue_scripts', 'wl_enqueue_scripts' );
251
+add_action('wp_enqueue_scripts', 'wl_enqueue_scripts');
252 252
 
253 253
 /**
254 254
  * Hooked to *wp_kses_allowed_html* filter, adds microdata attributes.
@@ -258,23 +258,23 @@  discard block
 block discarded – undo
258 258
  *
259 259
  * @return array An array which contains allowed microdata attributes.
260 260
  */
261
-function wordlift_allowed_html( $allowedtags, $context ) {
261
+function wordlift_allowed_html($allowedtags, $context) {
262 262
 
263
-	if ( 'post' !== $context ) {
263
+	if ('post' !== $context) {
264 264
 		return $allowedtags;
265 265
 	}
266 266
 
267
-	return array_merge_recursive( $allowedtags, array(
267
+	return array_merge_recursive($allowedtags, array(
268 268
 		'span' => array(
269 269
 			'itemscope' => true,
270 270
 			'itemtype'  => true,
271 271
 			'itemid'    => true,
272 272
 			'itemprop'  => true,
273 273
 		),
274
-	) );
274
+	));
275 275
 }
276 276
 
277
-add_filter( 'wp_kses_allowed_html', 'wordlift_allowed_html', 10, 2 );
277
+add_filter('wp_kses_allowed_html', 'wordlift_allowed_html', 10, 2);
278 278
 
279 279
 /**
280 280
  * Get the coordinates for the specified post ID.
@@ -283,16 +283,16 @@  discard block
 block discarded – undo
283 283
  *
284 284
  * @return array|null An array of coordinates or null.
285 285
  */
286
-function wl_get_coordinates( $post_id ) {
286
+function wl_get_coordinates($post_id) {
287 287
 
288
-	$latitude  = wl_schema_get_value( $post_id, 'latitude' );
289
-	$longitude = wl_schema_get_value( $post_id, 'longitude' );
288
+	$latitude  = wl_schema_get_value($post_id, 'latitude');
289
+	$longitude = wl_schema_get_value($post_id, 'longitude');
290 290
 
291 291
 	// DO NOT set latitude/longitude to 0/0 as default values. It's a specific place on the globe:
292 292
 	// "The zero/zero point of this system is located in the Gulf of Guinea about 625 km (390 mi) south of Tema, Ghana."
293 293
 	return array(
294
-		'latitude'  => isset( $latitude[0] ) && is_numeric( $latitude[0] ) ? $latitude[0] : '',
295
-		'longitude' => isset( $longitude[0] ) && is_numeric( $longitude[0] ) ? $longitude[0] : '',
294
+		'latitude'  => isset($latitude[0]) && is_numeric($latitude[0]) ? $latitude[0] : '',
295
+		'longitude' => isset($longitude[0]) && is_numeric($longitude[0]) ? $longitude[0] : '',
296 296
 	);
297 297
 }
298 298
 
@@ -303,12 +303,12 @@  discard block
 block discarded – undo
303 303
  *
304 304
  * @return string A datetime.
305 305
  */
306
-function wl_get_post_modified_time( $post ) {
306
+function wl_get_post_modified_time($post) {
307 307
 
308
-	$date_modified = get_post_modified_time( 'c', true, $post );
308
+	$date_modified = get_post_modified_time('c', true, $post);
309 309
 
310
-	if ( '-' === substr( $date_modified, 0, 1 ) ) {
311
-		return get_the_time( 'c', $post );
310
+	if ('-' === substr($date_modified, 0, 1)) {
311
+		return get_the_time('c', $post);
312 312
 	}
313 313
 
314 314
 	return $date_modified;
@@ -321,27 +321,27 @@  discard block
 block discarded – undo
321 321
  *
322 322
  * @return array An array of image URLs.
323 323
  */
324
-function wl_get_image_urls( $post_id ) {
324
+function wl_get_image_urls($post_id) {
325 325
 
326 326
 
327 327
 	// If there is a featured image it has the priority
328
-	$featured_image_id = get_post_thumbnail_id( $post_id );
329
-	if ( is_numeric( $featured_image_id ) ) {
330
-		$image_url = wp_get_attachment_url( $featured_image_id );
328
+	$featured_image_id = get_post_thumbnail_id($post_id);
329
+	if (is_numeric($featured_image_id)) {
330
+		$image_url = wp_get_attachment_url($featured_image_id);
331 331
 
332
-		return array( $image_url );
332
+		return array($image_url);
333 333
 	}
334 334
 
335 335
 	// wl_write_log( "wl_get_image_urls [ post id :: $post_id ]" );
336 336
 
337
-	$images = get_children( array(
337
+	$images = get_children(array(
338 338
 		'post_parent'    => $post_id,
339 339
 		'post_type'      => 'attachment',
340 340
 		'post_mime_type' => 'image',
341
-	) );
341
+	));
342 342
 
343 343
 	// Return an empty array if no image is found.
344
-	if ( empty( $images ) ) {
344
+	if (empty($images)) {
345 345
 		return array();
346 346
 	}
347 347
 
@@ -349,11 +349,11 @@  discard block
 block discarded – undo
349 349
 	$image_urls = array();
350 350
 
351 351
 	// Collect the URLs.
352
-	foreach ( $images as $attachment_id => $attachment ) {
353
-		$image_url = wp_get_attachment_url( $attachment_id );
352
+	foreach ($images as $attachment_id => $attachment) {
353
+		$image_url = wp_get_attachment_url($attachment_id);
354 354
 		// Ensure the URL isn't collected already.
355
-		if ( ! in_array( $image_url, $image_urls ) ) {
356
-			array_push( $image_urls, $image_url );
355
+		if ( ! in_array($image_url, $image_urls)) {
356
+			array_push($image_urls, $image_url);
357 357
 		}
358 358
 	}
359 359
 
@@ -370,17 +370,17 @@  discard block
 block discarded – undo
370 370
  *
371 371
  * @return string The SPARQL fragment.
372 372
  */
373
-function wl_get_sparql_images( $uri, $post_id ) {
373
+function wl_get_sparql_images($uri, $post_id) {
374 374
 
375 375
 	$sparql = '';
376 376
 
377 377
 	// Get the escaped URI.
378
-	$uri_e = esc_html( $uri );
378
+	$uri_e = esc_html($uri);
379 379
 
380 380
 	// Add SPARQL stmts to write the schema:image.
381
-	$image_urls = wl_get_image_urls( $post_id );
382
-	foreach ( $image_urls as $image_url ) {
383
-		$image_url_esc = wl_sparql_escape_uri( $image_url );
381
+	$image_urls = wl_get_image_urls($post_id);
382
+	foreach ($image_urls as $image_url) {
383
+		$image_url_esc = wl_sparql_escape_uri($image_url);
384 384
 		$sparql .= " <$uri_e> schema:image <$image_url_esc> . \n";
385 385
 	}
386 386
 
@@ -395,21 +395,21 @@  discard block
 block discarded – undo
395 395
  *
396 396
  * @return WP_Post|null A post instance or null if not found.
397 397
  */
398
-function wl_get_attachment_for_source_url( $parent_post_id, $source_url ) {
398
+function wl_get_attachment_for_source_url($parent_post_id, $source_url) {
399 399
 
400 400
 	// wl_write_log( "wl_get_attachment_for_source_url [ parent post id :: $parent_post_id ][ source url :: $source_url ]" );
401 401
 
402
-	$posts = get_posts( array(
402
+	$posts = get_posts(array(
403 403
 		'post_type'      => 'attachment',
404 404
 		'posts_per_page' => 1,
405 405
 		'post_status'    => 'any',
406 406
 		'post_parent'    => $parent_post_id,
407 407
 		'meta_key'       => 'wl_source_url',
408 408
 		'meta_value'     => $source_url,
409
-	) );
409
+	));
410 410
 
411 411
 	// Return the found post.
412
-	if ( 1 === count( $posts ) ) {
412
+	if (1 === count($posts)) {
413 413
 		return $posts[0];
414 414
 	}
415 415
 
@@ -423,10 +423,10 @@  discard block
 block discarded – undo
423 423
  * @param int    $post_id    The post ID.
424 424
  * @param string $source_url The source URL.
425 425
  */
426
-function wl_set_source_url( $post_id, $source_url ) {
426
+function wl_set_source_url($post_id, $source_url) {
427 427
 
428
-	delete_post_meta( $post_id, 'wl_source_url' );
429
-	add_post_meta( $post_id, 'wl_source_url', $source_url );
428
+	delete_post_meta($post_id, 'wl_source_url');
429
+	add_post_meta($post_id, 'wl_source_url', $source_url);
430 430
 }
431 431
 
432 432
 
@@ -442,10 +442,10 @@  discard block
 block discarded – undo
442 442
  *
443 443
  * @param bool $hard True if the rewrite involves configuration updates in Apache/IIS.
444 444
  */
445
-function wl_flush_rewrite_rules_hard( $hard ) {
445
+function wl_flush_rewrite_rules_hard($hard) {
446 446
 
447 447
 	// If WL is not yet configured, we cannot perform any update, so we exit.
448
-	if ( '' === wl_configuration_get_key() ) {
448
+	if ('' === wl_configuration_get_key()) {
449 449
 		return;
450 450
 	}
451 451
 
@@ -454,13 +454,13 @@  discard block
 block discarded – undo
454 454
 	$limit  = 100;
455 455
 
456 456
 	// Get more posts if the number of returned posts matches the limit.
457
-	while ( $limit === ( $posts = get_posts( array(
457
+	while ($limit === ($posts = get_posts(array(
458 458
 			'offset'      => $offset,
459 459
 			'numberposts' => $limit,
460 460
 			'orderby'     => 'ID',
461 461
 			'post_type'   => 'any',
462 462
 			'post_status' => 'publish',
463
-		) ) ) ) {
463
+		)))) {
464 464
 
465 465
 		// Holds the delete part of the query.
466 466
 		$delete_query = rl_sparql_prefixes();
@@ -469,16 +469,16 @@  discard block
 block discarded – undo
469 469
 		$insert_query = '';
470 470
 
471 471
 		// Cycle in each post to build the query.
472
-		foreach ( $posts as $post ) {
472
+		foreach ($posts as $post) {
473 473
 
474 474
 			// Ignore revisions.
475
-			if ( wp_is_post_revision( $post->ID ) ) {
475
+			if (wp_is_post_revision($post->ID)) {
476 476
 				continue;
477 477
 			}
478 478
 
479 479
 			// Get the entity URI.
480
-			$s = Wordlift_Sparql_Service::escape_uri( Wordlift_Entity_Service::get_instance()
481
-			                                                                 ->get_uri( $post->ID ) );
480
+			$s = Wordlift_Sparql_Service::escape_uri(Wordlift_Entity_Service::get_instance()
481
+			                                                                 ->get_uri($post->ID));
482 482
 
483 483
 			// Get the post URL.
484 484
 			// $url = wl_sparql_escape_uri( get_permalink( $post->ID ) );
@@ -487,13 +487,13 @@  discard block
 block discarded – undo
487 487
 			$delete_query .= "DELETE { <$s> schema:url ?u . } WHERE  { <$s> schema:url ?u . };\n";
488 488
 
489 489
 			$insert_query .= Wordlift_Schema_Url_Property_Service::get_instance()
490
-			                                                     ->get_insert_query( $s, $post->ID );
490
+			                                                     ->get_insert_query($s, $post->ID);
491 491
 
492 492
 		}
493 493
 
494 494
 
495 495
 		// Execute the query.
496
-		rl_execute_sparql_update_query( $delete_query . $insert_query );
496
+		rl_execute_sparql_update_query($delete_query.$insert_query);
497 497
 
498 498
 		// Advance to the next posts.
499 499
 		$offset += $limit;
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 
510 510
 }
511 511
 
512
-add_filter( 'flush_rewrite_rules_hard', 'wl_flush_rewrite_rules_hard', 10, 1 );
512
+add_filter('flush_rewrite_rules_hard', 'wl_flush_rewrite_rules_hard', 10, 1);
513 513
 
514 514
 /**
515 515
  * Sanitizes an URI path by replacing the non allowed characters with an underscore.
@@ -522,9 +522,9 @@  discard block
 block discarded – undo
522 522
  *
523 523
  * @return string The sanitized path.
524 524
  */
525
-function wl_sanitize_uri_path( $path, $char = '_' ) {
525
+function wl_sanitize_uri_path($path, $char = '_') {
526 526
 
527
-	return Wordlift_Uri_Service::get_instance()->sanitize_path( $path, $char );
527
+	return Wordlift_Uri_Service::get_instance()->sanitize_path($path, $char);
528 528
 }
529 529
 
530 530
 /**
@@ -534,10 +534,10 @@  discard block
 block discarded – undo
534 534
  *
535 535
  * @return array Array containing $value (if $value was not an array)
536 536
  */
537
-function wl_force_to_array( $value ) {
537
+function wl_force_to_array($value) {
538 538
 
539
-	if ( ! is_array( $value ) ) {
540
-		return array( $value );
539
+	if ( ! is_array($value)) {
540
+		return array($value);
541 541
 	}
542 542
 
543 543
 	return $value;
@@ -549,28 +549,28 @@  discard block
 block discarded – undo
549 549
 function wl_shutdown() {
550 550
 
551 551
 	// Get the filename to the temporary SPARQL file.
552
-	$filename = WL_TEMP_DIR . WL_REQUEST_ID . '.sparql';
552
+	$filename = WL_TEMP_DIR.WL_REQUEST_ID.'.sparql';
553 553
 
554 554
 	// If WordLift is buffering SPARQL queries, we're admins and a buffer exists, then schedule it.
555
-	if ( WL_ENABLE_SPARQL_UPDATE_QUERIES_BUFFERING && is_admin() && file_exists( $filename ) ) {
555
+	if (WL_ENABLE_SPARQL_UPDATE_QUERIES_BUFFERING && is_admin() && file_exists($filename)) {
556 556
 
557 557
 		// The request ID.
558
-		$args = array( WL_REQUEST_ID );
558
+		$args = array(WL_REQUEST_ID);
559 559
 
560 560
 		// Schedule the execution of the SPARQL query with the request ID.
561
-		wp_schedule_single_event( time(), 'wl_execute_saved_sparql_update_query', $args );
561
+		wp_schedule_single_event(time(), 'wl_execute_saved_sparql_update_query', $args);
562 562
 
563 563
 		// Check that the request is scheduled.
564
-		$timestamp = wp_next_scheduled( 'wl_execute_saved_sparql_update_query', $args );
564
+		$timestamp = wp_next_scheduled('wl_execute_saved_sparql_update_query', $args);
565 565
 
566 566
 		// Spawn the cron.
567 567
 		spawn_cron();
568 568
 
569
-		wl_write_log( "wl_shutdown [ request id :: " . WL_REQUEST_ID . " ][ timestamp :: $timestamp ]" );
569
+		wl_write_log("wl_shutdown [ request id :: ".WL_REQUEST_ID." ][ timestamp :: $timestamp ]");
570 570
 	}
571 571
 }
572 572
 
573
-add_action( 'shutdown', 'wl_shutdown' );
573
+add_action('shutdown', 'wl_shutdown');
574 574
 
575 575
 /**
576 576
  * Replaces the *itemid* attributes URIs with the WordLift URIs.
@@ -579,113 +579,113 @@  discard block
 block discarded – undo
579 579
  *
580 580
  * @return string The updated post content.
581 581
  */
582
-function wl_replace_item_id_with_uri( $content ) {
582
+function wl_replace_item_id_with_uri($content) {
583 583
 
584 584
 	// wl_write_log( "wl_replace_item_id_with_uri" );
585 585
 
586 586
 	// Strip slashes, see https://core.trac.wordpress.org/ticket/21767
587
-	$content = stripslashes( $content );
587
+	$content = stripslashes($content);
588 588
 
589 589
 	// If any match are found.
590 590
 	$matches = array();
591
-	if ( 0 < preg_match_all( '/ itemid="([^"]+)"/i', $content, $matches, PREG_SET_ORDER ) ) {
591
+	if (0 < preg_match_all('/ itemid="([^"]+)"/i', $content, $matches, PREG_SET_ORDER)) {
592 592
 
593
-		foreach ( $matches as $match ) {
593
+		foreach ($matches as $match) {
594 594
 
595 595
 			// Get the item ID.
596 596
 			$item_id = $match[1];
597 597
 
598 598
 			// Get the post bound to that item ID (looking both in the 'official' URI and in the 'same-as' .
599 599
 			$post = Wordlift_Entity_Service::get_instance()
600
-			                               ->get_entity_post_by_uri( $item_id );
600
+			                               ->get_entity_post_by_uri($item_id);
601 601
 
602 602
 			// If no entity is found, continue to the next one.
603
-			if ( null === $post ) {
603
+			if (null === $post) {
604 604
 				continue;
605 605
 			}
606 606
 
607 607
 			// Get the URI for that post.
608
-			$uri = wl_get_entity_uri( $post->ID );
608
+			$uri = wl_get_entity_uri($post->ID);
609 609
 
610 610
 			// wl_write_log( "wl_replace_item_id_with_uri [ item id :: $item_id ][ uri :: $uri ]" );
611 611
 
612 612
 			// If the item ID and the URI differ, replace the item ID with the URI saved in WordPress.
613
-			if ( $item_id !== $uri ) {
614
-				$uri_e   = esc_html( $uri );
615
-				$content = str_replace( " itemid=\"$item_id\"", " itemid=\"$uri_e\"", $content );
613
+			if ($item_id !== $uri) {
614
+				$uri_e   = esc_html($uri);
615
+				$content = str_replace(" itemid=\"$item_id\"", " itemid=\"$uri_e\"", $content);
616 616
 			}
617 617
 		}
618 618
 	}
619 619
 
620 620
 	// Reapply slashes.
621
-	$content = addslashes( $content );
621
+	$content = addslashes($content);
622 622
 
623 623
 	return $content;
624 624
 }
625 625
 
626
-add_filter( 'content_save_pre', 'wl_replace_item_id_with_uri', 1, 1 );
626
+add_filter('content_save_pre', 'wl_replace_item_id_with_uri', 1, 1);
627 627
 
628
-require_once( 'wordlift_entity_functions.php' );
628
+require_once('wordlift_entity_functions.php');
629 629
 
630 630
 // add editor related methods.
631
-require_once( 'wordlift_editor.php' );
631
+require_once('wordlift_editor.php');
632 632
 
633 633
 // add the WordLift entity custom type.
634
-require_once( 'wordlift_entity_type.php' );
635
-require_once( 'wordlift_entity_type_taxonomy.php' );
634
+require_once('wordlift_entity_type.php');
635
+require_once('wordlift_entity_type_taxonomy.php');
636 636
 
637 637
 // add callbacks on post save to notify data changes from wp to redlink triple store
638
-require_once( 'wordlift_to_redlink_data_push_callbacks.php' );
638
+require_once('wordlift_to_redlink_data_push_callbacks.php');
639 639
 
640
-require_once( 'modules/configuration/wordlift_configuration_settings.php' );
640
+require_once('modules/configuration/wordlift_configuration_settings.php');
641 641
 
642 642
 // Load modules
643
-require_once( 'modules/analyzer/wordlift_analyzer.php' );
644
-require_once( 'modules/linked_data/wordlift_linked_data.php' );
645
-require_once( 'modules/prefixes/wordlift_prefixes.php' );
646
-require_once( 'modules/redirector/wordlift_redirector.php' );
643
+require_once('modules/analyzer/wordlift_analyzer.php');
644
+require_once('modules/linked_data/wordlift_linked_data.php');
645
+require_once('modules/prefixes/wordlift_prefixes.php');
646
+require_once('modules/redirector/wordlift_redirector.php');
647 647
 
648 648
 // Shortcodes
649 649
 
650
-require_once( 'modules/geo_widget/wordlift_geo_widget.php' );
651
-require_once( 'shortcodes/wordlift_shortcode_chord.php' );
652
-require_once( 'shortcodes/wordlift_shortcode_geomap.php' );
653
-require_once( 'shortcodes/wordlift_shortcode_field.php' );
654
-require_once( 'shortcodes/wordlift_shortcode_faceted_search.php' );
655
-require_once( 'shortcodes/wordlift_shortcode_navigator.php' );
650
+require_once('modules/geo_widget/wordlift_geo_widget.php');
651
+require_once('shortcodes/wordlift_shortcode_chord.php');
652
+require_once('shortcodes/wordlift_shortcode_geomap.php');
653
+require_once('shortcodes/wordlift_shortcode_field.php');
654
+require_once('shortcodes/wordlift_shortcode_faceted_search.php');
655
+require_once('shortcodes/wordlift_shortcode_navigator.php');
656 656
 
657
-require_once( 'widgets/wordlift_widget_geo.php' );
658
-require_once( 'widgets/wordlift_widget_chord.php' );
659
-require_once( 'widgets/wordlift_widget_timeline.php' );
657
+require_once('widgets/wordlift_widget_geo.php');
658
+require_once('widgets/wordlift_widget_chord.php');
659
+require_once('widgets/wordlift_widget_timeline.php');
660 660
 
661
-require_once( 'wordlift_sparql.php' );
662
-require_once( 'wordlift_redlink.php' );
661
+require_once('wordlift_sparql.php');
662
+require_once('wordlift_redlink.php');
663 663
 
664 664
 // Add admin functions.
665 665
 // TODO: find a way to make 'admin' UI tests work.
666 666
 //if ( is_admin() ) {
667 667
 
668
-require_once( 'admin/wordlift_admin.php' );
669
-require_once( 'admin/wordlift_admin_edit_post.php' );
670
-require_once( 'admin/wordlift_admin_save_post.php' );
668
+require_once('admin/wordlift_admin.php');
669
+require_once('admin/wordlift_admin_edit_post.php');
670
+require_once('admin/wordlift_admin_save_post.php');
671 671
 
672 672
 // add the entities meta box.
673
-require_once( 'admin/wordlift_admin_meta_box_entities.php' );
673
+require_once('admin/wordlift_admin_meta_box_entities.php');
674 674
 
675 675
 // add the entity creation AJAX.
676
-require_once( 'admin/wordlift_admin_ajax_related_posts.php' );
676
+require_once('admin/wordlift_admin_ajax_related_posts.php');
677 677
 
678 678
 // Load the wl_chord TinyMCE button and configuration dialog.
679
-require_once( 'admin/wordlift_admin_shortcodes.php' );
679
+require_once('admin/wordlift_admin_shortcodes.php');
680 680
 
681 681
 // Provide syncing features.
682
-require_once( 'admin/wordlift_admin_sync.php' );
682
+require_once('admin/wordlift_admin_sync.php');
683 683
 //}
684 684
 
685 685
 // load languages.
686 686
 // TODO: the following call gives for granted that the plugin is in the wordlift directory,
687 687
 //       we're currently doing this because wordlift is symbolic linked.
688
-load_plugin_textdomain( 'wordlift', false, '/wordlift/languages' );
688
+load_plugin_textdomain('wordlift', false, '/wordlift/languages');
689 689
 
690 690
 
691 691
 /**
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
  * This action is documented in includes/class-wordlift-activator.php
694 694
  */
695 695
 function activate_wordlift() {
696
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
696
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-activator.php';
697 697
 	Wordlift_Activator::activate();
698 698
 }
699 699
 
@@ -702,18 +702,18 @@  discard block
 block discarded – undo
702 702
  * This action is documented in includes/class-wordlift-deactivator.php
703 703
  */
704 704
 function deactivate_wordlift() {
705
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
705
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-deactivator.php';
706 706
 	Wordlift_Deactivator::deactivate();
707 707
 }
708 708
 
709
-register_activation_hook( __FILE__, 'activate_wordlift' );
710
-register_deactivation_hook( __FILE__, 'deactivate_wordlift' );
709
+register_activation_hook(__FILE__, 'activate_wordlift');
710
+register_deactivation_hook(__FILE__, 'deactivate_wordlift');
711 711
 
712 712
 /**
713 713
  * The core plugin class that is used to define internationalization,
714 714
  * admin-specific hooks, and public-facing site hooks.
715 715
  */
716
-require plugin_dir_path( __FILE__ ) . 'includes/class-wordlift.php';
716
+require plugin_dir_path(__FILE__).'includes/class-wordlift.php';
717 717
 
718 718
 /**
719 719
  * Begins execution of the plugin.
Please login to merge, or discard this patch.
src/admin/wordlift_admin_shortcodes.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
  * Loads the buttons in TinyMCE.
10 10
  */
11 11
 function wl_admin_shortcode_buttons() {
12
-	// Only add hooks when the current user has permissions AND is in Rich Text editor mode
13
-	if ( ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) && get_user_option( 'rich_editing' ) ) {
14
-		// add_filter( 'mce_external_plugins', 'wl_admin_shortcode_buttons_register_tinymce_javascript' );
15
-		add_filter( 'mce_buttons', 'wl_admin_shortcode_register_buttons' );
16
-		add_action( 'admin_footer', 'wl_admin_inject_chord_dialog_dependencies' );
17
-	}
12
+    // Only add hooks when the current user has permissions AND is in Rich Text editor mode
13
+    if ( ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) && get_user_option( 'rich_editing' ) ) {
14
+        // add_filter( 'mce_external_plugins', 'wl_admin_shortcode_buttons_register_tinymce_javascript' );
15
+        add_filter( 'mce_buttons', 'wl_admin_shortcode_register_buttons' );
16
+        add_action( 'admin_footer', 'wl_admin_inject_chord_dialog_dependencies' );
17
+    }
18 18
 }
19 19
 
20 20
 ///**
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
  * @return array The buttons array including the *wl_shortcodes_menu*.
40 40
  */
41 41
 function wl_admin_shortcode_register_buttons( $buttons ) {
42
-	array_push( $buttons, 'wl_shortcodes_menu' );
42
+    array_push( $buttons, 'wl_shortcodes_menu' );
43 43
 
44
-	return $buttons;
44
+    return $buttons;
45 45
 }
46 46
 
47 47
 // init process for button control
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
  */
56 56
 function wl_admin_inject_chord_dialog_dependencies() {
57 57
 
58
-	wp_enqueue_style( 'wp-color-picker' );
59
-	wp_enqueue_script( 'wp-color-picker' );
60
-	wp_enqueue_style( 'jquery-ui-slider' );
61
-	// Not included by default :|
62
-	// TODO include jquery ui css from the plugin creates css issues on the slider
63
-	// wp_enqueue_style('jquery-ui-css', plugins_url( 'css/jquery-ui/jquery-ui.min.css', __FILE__ ) );
64
-	wp_enqueue_style( 'wp-jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css' );
58
+    wp_enqueue_style( 'wp-color-picker' );
59
+    wp_enqueue_script( 'wp-color-picker' );
60
+    wp_enqueue_style( 'jquery-ui-slider' );
61
+    // Not included by default :|
62
+    // TODO include jquery ui css from the plugin creates css issues on the slider
63
+    // wp_enqueue_style('jquery-ui-css', plugins_url( 'css/jquery-ui/jquery-ui.min.css', __FILE__ ) );
64
+    wp_enqueue_style( 'wp-jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css' );
65 65
 
66
-	wp_enqueue_script( 'jquery' );
67
-	wp_enqueue_script( 'jquery-ui-core' );
68
-	wp_enqueue_script( 'jquery-ui-slider' );
66
+    wp_enqueue_script( 'jquery' );
67
+    wp_enqueue_script( 'jquery-ui-core' );
68
+    wp_enqueue_script( 'jquery-ui-slider' );
69 69
 
70 70
 }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
  */
11 11
 function wl_admin_shortcode_buttons() {
12 12
 	// Only add hooks when the current user has permissions AND is in Rich Text editor mode
13
-	if ( ( current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' ) ) && get_user_option( 'rich_editing' ) ) {
13
+	if ((current_user_can('edit_posts') || current_user_can('edit_pages')) && get_user_option('rich_editing')) {
14 14
 		// add_filter( 'mce_external_plugins', 'wl_admin_shortcode_buttons_register_tinymce_javascript' );
15
-		add_filter( 'mce_buttons', 'wl_admin_shortcode_register_buttons' );
16
-		add_action( 'admin_footer', 'wl_admin_inject_chord_dialog_dependencies' );
15
+		add_filter('mce_buttons', 'wl_admin_shortcode_register_buttons');
16
+		add_action('admin_footer', 'wl_admin_inject_chord_dialog_dependencies');
17 17
 	}
18 18
 }
19 19
 
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
  *
39 39
  * @return array The buttons array including the *wl_shortcodes_menu*.
40 40
  */
41
-function wl_admin_shortcode_register_buttons( $buttons ) {
42
-	array_push( $buttons, 'wl_shortcodes_menu' );
41
+function wl_admin_shortcode_register_buttons($buttons) {
42
+	array_push($buttons, 'wl_shortcodes_menu');
43 43
 
44 44
 	return $buttons;
45 45
 }
46 46
 
47 47
 // init process for button control
48
-add_action( 'admin_init', 'wl_admin_shortcode_buttons' );
48
+add_action('admin_init', 'wl_admin_shortcode_buttons');
49 49
 
50 50
 
51 51
 /**
@@ -55,16 +55,16 @@  discard block
 block discarded – undo
55 55
  */
56 56
 function wl_admin_inject_chord_dialog_dependencies() {
57 57
 
58
-	wp_enqueue_style( 'wp-color-picker' );
59
-	wp_enqueue_script( 'wp-color-picker' );
60
-	wp_enqueue_style( 'jquery-ui-slider' );
58
+	wp_enqueue_style('wp-color-picker');
59
+	wp_enqueue_script('wp-color-picker');
60
+	wp_enqueue_style('jquery-ui-slider');
61 61
 	// Not included by default :|
62 62
 	// TODO include jquery ui css from the plugin creates css issues on the slider
63 63
 	// wp_enqueue_style('jquery-ui-css', plugins_url( 'css/jquery-ui/jquery-ui.min.css', __FILE__ ) );
64
-	wp_enqueue_style( 'wp-jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css' );
64
+	wp_enqueue_style('wp-jquery-ui-css', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery.ui.all.css');
65 65
 
66
-	wp_enqueue_script( 'jquery' );
67
-	wp_enqueue_script( 'jquery-ui-core' );
68
-	wp_enqueue_script( 'jquery-ui-slider' );
66
+	wp_enqueue_script('jquery');
67
+	wp_enqueue_script('jquery-ui-core');
68
+	wp_enqueue_script('jquery-ui-slider');
69 69
 
70 70
 }
Please login to merge, or discard this patch.
src/public/class-wordlift-related-entities-cloud-widget.php 2 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -16,33 +16,33 @@  discard block
 block discarded – undo
16 16
  */
17 17
 class Wordlift_Related_Entities_Cloud_Widget extends Wordlift_Widget {
18 18
 
19
-	/**
20
-	 * Create an {@link Wordlift_Related_Entities_Cloud_Widget} instance.
21
-	 *
22
-	 * @since 3.11.0
23
-	 */
24
-	public function __construct() {
25
-		parent::__construct(
26
-			'wl_related_entities_cloud',
27
-			__( 'WordLift Entities Cloud', 'wordlift' ),
28
-			array(
29
-				'classname'   => 'wl_related_entities_cloud',
30
-				'description' => __( 'Display entities related to the current post/entity in a tag cloud.', 'wordlift' ),
31
-			)
32
-		);
33
-
34
-	}
35
-
36
-	/**
37
-	 * @inheritdoc
38
-	 */
39
-	public function form( $instance ) {
40
-		$title_id          = $this->get_field_id( 'title' );
41
-		$instance['title'] = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
42
-		?>
19
+    /**
20
+     * Create an {@link Wordlift_Related_Entities_Cloud_Widget} instance.
21
+     *
22
+     * @since 3.11.0
23
+     */
24
+    public function __construct() {
25
+        parent::__construct(
26
+            'wl_related_entities_cloud',
27
+            __( 'WordLift Entities Cloud', 'wordlift' ),
28
+            array(
29
+                'classname'   => 'wl_related_entities_cloud',
30
+                'description' => __( 'Display entities related to the current post/entity in a tag cloud.', 'wordlift' ),
31
+            )
32
+        );
33
+
34
+    }
35
+
36
+    /**
37
+     * @inheritdoc
38
+     */
39
+    public function form( $instance ) {
40
+        $title_id          = $this->get_field_id( 'title' );
41
+        $instance['title'] = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
42
+        ?>
43 43
 
44 44
 		<p><label for="<?php echo esc_attr( $title_id ); ?>"><?php
45
-				esc_html_e( 'Title:' ); ?></label>
45
+                esc_html_e( 'Title:' ); ?></label>
46 46
 			<input type="text" class="widefat"
47 47
 			       id="<?php echo esc_attr( $title_id ); ?>"
48 48
 			       name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
@@ -51,46 +51,46 @@  discard block
 block discarded – undo
51 51
 
52 52
 		<?php
53 53
 
54
-		return 'wl_related_entities_cloud_form';
55
-	}
54
+        return 'wl_related_entities_cloud_form';
55
+    }
56 56
 
57
-	/**
58
-	 * @inheritdoc
59
-	 */
60
-	public function update( $new_instance, $old_instance ) {
57
+    /**
58
+     * @inheritdoc
59
+     */
60
+    public function update( $new_instance, $old_instance ) {
61 61
 
62
-		return array( 'title' => sanitize_text_field( $new_instance['title'] ) );
63
-	}
62
+        return array( 'title' => sanitize_text_field( $new_instance['title'] ) );
63
+    }
64 64
 
65
-	/**
66
-	 * @inheritdoc
67
-	 */
68
-	public function widget( $args, $instance ) {
65
+    /**
66
+     * @inheritdoc
67
+     */
68
+    public function widget( $args, $instance ) {
69 69
 
70
-		/*
70
+        /*
71 71
 		 * Use the shortcode to calculate the HTML required to show the cloud
72 72
 		 * if there is no such html do not render the widget at all.
73 73
 		 */
74
-		$cloud_html = do_shortcode( '[wl_cloud]' );
75
-		if ( empty( $cloud_html ) ) {
76
-			return false;
77
-		}
74
+        $cloud_html = do_shortcode( '[wl_cloud]' );
75
+        if ( empty( $cloud_html ) ) {
76
+            return false;
77
+        }
78 78
 
79
-		// The widget title.
80
-		$title = empty( $instance['title'] ) ? __( 'Related Entities', 'wordlift' ) : $instance['title'];
79
+        // The widget title.
80
+        $title = empty( $instance['title'] ) ? __( 'Related Entities', 'wordlift' ) : $instance['title'];
81 81
 
82
-		// Standard filter all widgets should apply
83
-		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
82
+        // Standard filter all widgets should apply
83
+        $title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
84 84
 
85
-		echo $args['before_widget'];
85
+        echo $args['before_widget'];
86 86
 
87
-		if ( $title ) {
88
-			echo $args['before_title'] . $title . $args['after_title'];
89
-		}
87
+        if ( $title ) {
88
+            echo $args['before_title'] . $title . $args['after_title'];
89
+        }
90 90
 
91
-		echo $cloud_html;
92
-		echo $args['after_widget'];
91
+        echo $cloud_html;
92
+        echo $args['after_widget'];
93 93
 
94
-	}
94
+    }
95 95
 
96 96
 }
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
 	public function __construct() {
25 25
 		parent::__construct(
26 26
 			'wl_related_entities_cloud',
27
-			__( 'WordLift Entities Cloud', 'wordlift' ),
27
+			__('WordLift Entities Cloud', 'wordlift'),
28 28
 			array(
29 29
 				'classname'   => 'wl_related_entities_cloud',
30
-				'description' => __( 'Display entities related to the current post/entity in a tag cloud.', 'wordlift' ),
30
+				'description' => __('Display entities related to the current post/entity in a tag cloud.', 'wordlift'),
31 31
 			)
32 32
 		);
33 33
 
@@ -36,17 +36,17 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	 * @inheritdoc
38 38
 	 */
39
-	public function form( $instance ) {
40
-		$title_id          = $this->get_field_id( 'title' );
41
-		$instance['title'] = ! empty( $instance['title'] ) ? esc_attr( $instance['title'] ) : '';
39
+	public function form($instance) {
40
+		$title_id          = $this->get_field_id('title');
41
+		$instance['title'] = ! empty($instance['title']) ? esc_attr($instance['title']) : '';
42 42
 		?>
43 43
 
44
-		<p><label for="<?php echo esc_attr( $title_id ); ?>"><?php
45
-				esc_html_e( 'Title:' ); ?></label>
44
+		<p><label for="<?php echo esc_attr($title_id); ?>"><?php
45
+				esc_html_e('Title:'); ?></label>
46 46
 			<input type="text" class="widefat"
47
-			       id="<?php echo esc_attr( $title_id ); ?>"
48
-			       name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
49
-			       value="<?php echo esc_attr( $instance['title'] ); ?>" />
47
+			       id="<?php echo esc_attr($title_id); ?>"
48
+			       name="<?php echo esc_attr($this->get_field_name('title')); ?>"
49
+			       value="<?php echo esc_attr($instance['title']); ?>" />
50 50
 		</p>
51 51
 
52 52
 		<?php
@@ -57,35 +57,35 @@  discard block
 block discarded – undo
57 57
 	/**
58 58
 	 * @inheritdoc
59 59
 	 */
60
-	public function update( $new_instance, $old_instance ) {
60
+	public function update($new_instance, $old_instance) {
61 61
 
62
-		return array( 'title' => sanitize_text_field( $new_instance['title'] ) );
62
+		return array('title' => sanitize_text_field($new_instance['title']));
63 63
 	}
64 64
 
65 65
 	/**
66 66
 	 * @inheritdoc
67 67
 	 */
68
-	public function widget( $args, $instance ) {
68
+	public function widget($args, $instance) {
69 69
 
70 70
 		/*
71 71
 		 * Use the shortcode to calculate the HTML required to show the cloud
72 72
 		 * if there is no such html do not render the widget at all.
73 73
 		 */
74
-		$cloud_html = do_shortcode( '[wl_cloud]' );
75
-		if ( empty( $cloud_html ) ) {
74
+		$cloud_html = do_shortcode('[wl_cloud]');
75
+		if (empty($cloud_html)) {
76 76
 			return false;
77 77
 		}
78 78
 
79 79
 		// The widget title.
80
-		$title = empty( $instance['title'] ) ? __( 'Related Entities', 'wordlift' ) : $instance['title'];
80
+		$title = empty($instance['title']) ? __('Related Entities', 'wordlift') : $instance['title'];
81 81
 
82 82
 		// Standard filter all widgets should apply
83
-		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
83
+		$title = apply_filters('widget_title', $title, $instance, $this->id_base);
84 84
 
85 85
 		echo $args['before_widget'];
86 86
 
87
-		if ( $title ) {
88
-			echo $args['before_title'] . $title . $args['after_title'];
87
+		if ($title) {
88
+			echo $args['before_title'].$title.$args['after_title'];
89 89
 		}
90 90
 
91 91
 		echo $cloud_html;
Please login to merge, or discard this patch.
src/public/class-wordlift-related-entities-cloud-shortcode.php 2 patches
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -16,86 +16,86 @@
 block discarded – undo
16 16
  */
17 17
 class Wordlift_Related_Entities_Cloud_Shortcode extends Wordlift_Shortcode {
18 18
 
19
-	/**
20
-	 * {@inheritdoc}
21
-	 */
22
-	const SHORTCODE = 'wl_cloud';
19
+    /**
20
+     * {@inheritdoc}
21
+     */
22
+    const SHORTCODE = 'wl_cloud';
23 23
 
24
-	/**
25
-	 * {@inheritdoc}
26
-	 */
27
-	public function render( $atts ) {
24
+    /**
25
+     * {@inheritdoc}
26
+     */
27
+    public function render( $atts ) {
28 28
 
29
-		$tags = $this->get_related_entities_tags();
29
+        $tags = $this->get_related_entities_tags();
30 30
 
31
-		// Bail out if there are no associated entities.
32
-		if ( empty( $tags ) ) {
33
-			return '';
34
-		}
31
+        // Bail out if there are no associated entities.
32
+        if ( empty( $tags ) ) {
33
+            return '';
34
+        }
35 35
 
36
-		/*
36
+        /*
37 37
 		 * Since the output is use in the widget as well, we need to have the
38 38
 		 * same class as the core tagcloud widget, to easily inherit its styling.
39 39
 		 */
40
-		return '<div class="tagcloud wl-related-entities-cloud">' .
41
-		       wp_generate_tag_cloud( $tags ) .
42
-		       '</div>';
43
-	}
44
-
45
-	/**
46
-	 * Find the related entities to the currently displayed post and
47
-	 * calculate the "tags" for them as wp_generate_tag_cloud expects to get.
48
-	 *
49
-	 * @since 3.11.0
50
-	 *
51
-	 * @return array    Array of tags. Empty array in case we re not in a context
52
-	 *                  of a post, or it has no related entities.
53
-	 */
54
-	public function get_related_entities_tags() {
55
-
56
-		// Define the supported types list.
57
-		$supported_types = array( 'post', Wordlift_Entity_Service::TYPE_NAME );
58
-
59
-		// Show nothing if not on a post or entity page.
60
-		if ( ! is_singular( $supported_types ) ) {
61
-			return array();
62
-		}
63
-
64
-		// Get the IDs of entities related to current post.
65
-		$related_entities = wl_core_get_related_entity_ids( get_the_ID(), array( 'status' => 'publish' ) );
66
-
67
-		// Bail out if there are no associated entities.
68
-		if ( empty( $related_entities ) ) {
69
-			return array();
70
-		}
71
-
72
-		/*
40
+        return '<div class="tagcloud wl-related-entities-cloud">' .
41
+                wp_generate_tag_cloud( $tags ) .
42
+                '</div>';
43
+    }
44
+
45
+    /**
46
+     * Find the related entities to the currently displayed post and
47
+     * calculate the "tags" for them as wp_generate_tag_cloud expects to get.
48
+     *
49
+     * @since 3.11.0
50
+     *
51
+     * @return array    Array of tags. Empty array in case we re not in a context
52
+     *                  of a post, or it has no related entities.
53
+     */
54
+    public function get_related_entities_tags() {
55
+
56
+        // Define the supported types list.
57
+        $supported_types = array( 'post', Wordlift_Entity_Service::TYPE_NAME );
58
+
59
+        // Show nothing if not on a post or entity page.
60
+        if ( ! is_singular( $supported_types ) ) {
61
+            return array();
62
+        }
63
+
64
+        // Get the IDs of entities related to current post.
65
+        $related_entities = wl_core_get_related_entity_ids( get_the_ID(), array( 'status' => 'publish' ) );
66
+
67
+        // Bail out if there are no associated entities.
68
+        if ( empty( $related_entities ) ) {
69
+            return array();
70
+        }
71
+
72
+        /*
73 73
 		 * Create an array of "tags" to feed to wp_generate_tag_cloud.
74 74
 		 * Use the number of posts and entities connected to the entity as a weight.
75 75
 		 */
76
-		$tags = array();
77
-
78
-		foreach ( $related_entities as $entity_id ) {
79
-
80
-			$connected_entities = count( wl_core_get_related_entity_ids( $entity_id, array( 'status' => 'publish' ) ) );
81
-			$connected_posts    = count( wl_core_get_related_posts( $entity_id, array( 'status' => 'publish' ) ) );
82
-
83
-			$tags[] = (object) array(
84
-				'id'    => $entity_id,
85
-				// Used to give a unique class on the tag.
86
-				'name'  => get_the_title( $entity_id ),
87
-				// The text of the tag.
88
-				'slug'  => get_the_title( $entity_id ),
89
-				// Required but not seem to be relevant
90
-				'link'  => get_permalink( $entity_id ),
91
-				// the url the tag links to.
92
-				'count' => $connected_entities + $connected_posts,
93
-				// The weight.
94
-			);
95
-
96
-		}
97
-
98
-		return $tags;
99
-	}
76
+        $tags = array();
77
+
78
+        foreach ( $related_entities as $entity_id ) {
79
+
80
+            $connected_entities = count( wl_core_get_related_entity_ids( $entity_id, array( 'status' => 'publish' ) ) );
81
+            $connected_posts    = count( wl_core_get_related_posts( $entity_id, array( 'status' => 'publish' ) ) );
82
+
83
+            $tags[] = (object) array(
84
+                'id'    => $entity_id,
85
+                // Used to give a unique class on the tag.
86
+                'name'  => get_the_title( $entity_id ),
87
+                // The text of the tag.
88
+                'slug'  => get_the_title( $entity_id ),
89
+                // Required but not seem to be relevant
90
+                'link'  => get_permalink( $entity_id ),
91
+                // the url the tag links to.
92
+                'count' => $connected_entities + $connected_posts,
93
+                // The weight.
94
+            );
95
+
96
+        }
97
+
98
+        return $tags;
99
+    }
100 100
 
101 101
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,12 +24,12 @@  discard block
 block discarded – undo
24 24
 	/**
25 25
 	 * {@inheritdoc}
26 26
 	 */
27
-	public function render( $atts ) {
27
+	public function render($atts) {
28 28
 
29 29
 		$tags = $this->get_related_entities_tags();
30 30
 
31 31
 		// Bail out if there are no associated entities.
32
-		if ( empty( $tags ) ) {
32
+		if (empty($tags)) {
33 33
 			return '';
34 34
 		}
35 35
 
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 		 * Since the output is use in the widget as well, we need to have the
38 38
 		 * same class as the core tagcloud widget, to easily inherit its styling.
39 39
 		 */
40
-		return '<div class="tagcloud wl-related-entities-cloud">' .
41
-		       wp_generate_tag_cloud( $tags ) .
40
+		return '<div class="tagcloud wl-related-entities-cloud">'.
41
+		       wp_generate_tag_cloud($tags).
42 42
 		       '</div>';
43 43
 	}
44 44
 
@@ -54,18 +54,18 @@  discard block
 block discarded – undo
54 54
 	public function get_related_entities_tags() {
55 55
 
56 56
 		// Define the supported types list.
57
-		$supported_types = array( 'post', Wordlift_Entity_Service::TYPE_NAME );
57
+		$supported_types = array('post', Wordlift_Entity_Service::TYPE_NAME);
58 58
 
59 59
 		// Show nothing if not on a post or entity page.
60
-		if ( ! is_singular( $supported_types ) ) {
60
+		if ( ! is_singular($supported_types)) {
61 61
 			return array();
62 62
 		}
63 63
 
64 64
 		// Get the IDs of entities related to current post.
65
-		$related_entities = wl_core_get_related_entity_ids( get_the_ID(), array( 'status' => 'publish' ) );
65
+		$related_entities = wl_core_get_related_entity_ids(get_the_ID(), array('status' => 'publish'));
66 66
 
67 67
 		// Bail out if there are no associated entities.
68
-		if ( empty( $related_entities ) ) {
68
+		if (empty($related_entities)) {
69 69
 			return array();
70 70
 		}
71 71
 
@@ -75,19 +75,19 @@  discard block
 block discarded – undo
75 75
 		 */
76 76
 		$tags = array();
77 77
 
78
-		foreach ( $related_entities as $entity_id ) {
78
+		foreach ($related_entities as $entity_id) {
79 79
 
80
-			$connected_entities = count( wl_core_get_related_entity_ids( $entity_id, array( 'status' => 'publish' ) ) );
81
-			$connected_posts    = count( wl_core_get_related_posts( $entity_id, array( 'status' => 'publish' ) ) );
80
+			$connected_entities = count(wl_core_get_related_entity_ids($entity_id, array('status' => 'publish')));
81
+			$connected_posts    = count(wl_core_get_related_posts($entity_id, array('status' => 'publish')));
82 82
 
83 83
 			$tags[] = (object) array(
84 84
 				'id'    => $entity_id,
85 85
 				// Used to give a unique class on the tag.
86
-				'name'  => get_the_title( $entity_id ),
86
+				'name'  => get_the_title($entity_id),
87 87
 				// The text of the tag.
88
-				'slug'  => get_the_title( $entity_id ),
88
+				'slug'  => get_the_title($entity_id),
89 89
 				// Required but not seem to be relevant
90
-				'link'  => get_permalink( $entity_id ),
90
+				'link'  => get_permalink($entity_id),
91 91
 				// the url the tag links to.
92 92
 				'count' => $connected_entities + $connected_posts,
93 93
 				// The weight.
Please login to merge, or discard this patch.
src/includes/class-wordlift.php 2 patches
Indentation   +1072 added lines, -1072 removed lines patch added patch discarded remove patch
@@ -29,1150 +29,1150 @@
 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 private
218
-	 * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
219
-	 */
220
-	private $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
-	 *
251
-	 * @since  3.7.0
252
-	 * @access private
253
-	 * @var \Wordlift_Property_Factory $property_factory
254
-	 */
255
-	private $property_factory;
256
-
257
-	/**
258
-	 * The 'Download Your Data' page.
259
-	 *
260
-	 * @since  3.6.0
261
-	 * @access private
262
-	 * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
263
-	 */
264
-	private $download_your_data_page;
265
-
266
-	/**
267
-	 * The 'WordLift Settings' page.
268
-	 *
269
-	 * @since  3.11.0
270
-	 * @access protected
271
-	 * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
272
-	 */
273
-	protected $settings_page;
274
-
275
-	/**
276
-	 * The install wizard page.
277
-	 *
278
-	 * @since  3.9.0
279
-	 * @access private
280
-	 * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
281
-	 */
282
-	private $admin_setup;
283
-
284
-	/**
285
-	 * The Content Filter Service hooks up to the 'the_content' filter and provides
286
-	 * linking of entities to their pages.
287
-	 *
288
-	 * @since  3.8.0
289
-	 * @access private
290
-	 * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
291
-	 */
292
-	private $content_filter_service;
293
-
294
-	/**
295
-	 * A {@link Wordlift_Key_Validation_Service} instance.
296
-	 *
297
-	 * @since  3.9.0
298
-	 * @access private
299
-	 * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
300
-	 */
301
-	private $key_validation_service;
302
-
303
-	/**
304
-	 * A {@link Wordlift_Rating_Service} instance.
305
-	 *
306
-	 * @since  3.10.0
307
-	 * @access private
308
-	 * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
309
-	 */
310
-	private $rating_service;
311
-
312
-	/**
313
-	 * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
314
-	 *
315
-	 * @since  3.10.0
316
-	 * @access protected
317
-	 * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
318
-	 */
319
-	protected $post_to_jsonld_converter;
320
-
321
-	/**
322
-	 * A {@link Wordlift_Configuration_Service} instance.
323
-	 *
324
-	 * @since  3.10.0
325
-	 * @access protected
326
-	 * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
327
-	 */
328
-	protected $configuration_service;
329
-
330
-	/**
331
-	 * A {@link Wordlift_Entity_Type_Service} instance.
332
-	 *
333
-	 * @since  3.10.0
334
-	 * @access protected
335
-	 * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
336
-	 */
337
-	protected $entity_type_service;
338
-
339
-	/**
340
-	 * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
341
-	 *
342
-	 * @since  3.10.0
343
-	 * @access protected
344
-	 * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
345
-	 */
346
-	protected $entity_post_to_jsonld_converter;
347
-
348
-	/**
349
-	 * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
350
-	 *
351
-	 * @since  3.10.0
352
-	 * @access protected
353
-	 * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
354
-	 */
355
-	protected $postid_to_jsonld_converter;
356
-
357
-	/**
358
-	 * The {@link Wordlift_Admin_Status_Page} class.
359
-	 *
360
-	 * @since  3.9.8
361
-	 * @access private
362
-	 * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
363
-	 */
364
-	private $status_page;
365
-
366
-	/**
367
-	 * The {@link Wordlift_Category_Taxonomy_Service} instance.
368
-	 *
369
-	 * @since  3.11.0
370
-	 * @access protected
371
-	 * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
372
-	 */
373
-	protected $category_taxonomy_service;
374
-
375
-	/**
376
-	 * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
377
-	 *
378
-	 * @since  3.11.0
379
-	 * @access protected
380
-	 * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
381
-	 */
382
-	protected $settings_page_action_link;
383
-
384
-	/**
385
-	 * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
386
-	 *
387
-	 * @since  3.11.0
388
-	 * @access protected
389
-	 * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
390
-	 */
391
-	protected $publisher_ajax_adapter;
392
-
393
-	/**
394
-	 * The {@link Wordlift_Admin_Input_Element} element renderer.
395
-	 *
396
-	 * @since  3.11.0
397
-	 * @access protected
398
-	 * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
399
-	 */
400
-	protected $input_element;
401
-
402
-	/**
403
-	 * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
404
-	 *
405
-	 * @since  3.11.0
406
-	 * @access protected
407
-	 * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
408
-	 */
409
-	protected $language_select_element;
410
-
411
-	/**
412
-	 * The {@link Wordlift_Admin_Publisher_Element} element renderer.
413
-	 *
414
-	 * @since  3.11.0
415
-	 * @access protected
416
-	 * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
417
-	 */
418
-	protected $publisher_element;
419
-
420
-	/**
421
-	 * The {@link Wordlift_Admin_Select2_Element} element renderer.
422
-	 *
423
-	 * @since  3.11.0
424
-	 * @access protected
425
-	 * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
426
-	 */
427
-	protected $select2_element;
428
-
429
-	/**
430
-	 * The controller for the entity type list admin page
431
-	 *
432
-	 * @since  3.11.0
433
-	 * @access private
434
-	 * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
435
-	 */
436
-	private $entity_type_admin_page;
437
-
438
-	/**
439
-	 * The controller for the entity type settings admin page
440
-	 *
441
-	 * @since  3.11.0
442
-	 * @access private
443
-	 * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
444
-	 */
445
-	private $entity_type_settings_admin_page;
446
-
447
-	/**
448
-	 * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
449
-	 *
450
-	 * @since  3.11.0
451
-	 * @access protected
452
-	 * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
453
-	 */
454
-	protected $related_entities_cloud_widget;
455
-
456
-	/**
457
-	 * {@link Wordlift}'s singleton instance.
458
-	 *
459
-	 * @since  3.11.2
460
-	 *
461
-	 * @since  3.11.2
462
-	 * @access private
463
-	 * @var Wordlift $instance {@link Wordlift}'s singleton instance.
464
-	 */
465
-	private static $instance;
466
-
467
-	/**
468
-	 * Define the core functionality of the plugin.
469
-	 *
470
-	 * Set the plugin name and the plugin version that can be used throughout the plugin.
471
-	 * Load the dependencies, define the locale, and set the hooks for the admin area and
472
-	 * the public-facing side of the site.
473
-	 *
474
-	 * @since    1.0.0
475
-	 */
476
-	public function __construct() {
477
-
478
-		$this->plugin_name = 'wordlift';
479
-		$this->version     = '3.12.0-dev';
480
-		$this->load_dependencies();
481
-		$this->set_locale();
482
-		$this->define_admin_hooks();
483
-		$this->define_public_hooks();
484
-
485
-		self::$instance = $this;
486
-
487
-	}
488
-
489
-	/**
490
-	 * Get the singleton instance.
491
-	 *
492
-	 * @since 3.11.2
493
-	 *
494
-	 * @return Wordlift The {@link Wordlift} singleton instance.
495
-	 */
496
-	public static function get_instance() {
497
-
498
-		return self::$instance;
499
-	}
500
-
501
-	/**
502
-	 * Load the required dependencies for this plugin.
503
-	 *
504
-	 * Include the following files that make up the plugin:
505
-	 *
506
-	 * - Wordlift_Loader. Orchestrates the hooks of the plugin.
507
-	 * - Wordlift_i18n. Defines internationalization functionality.
508
-	 * - Wordlift_Admin. Defines all hooks for the admin area.
509
-	 * - Wordlift_Public. Defines all hooks for the public side of the site.
510
-	 *
511
-	 * Create an instance of the loader which will be used to register the hooks
512
-	 * with WordPress.
513
-	 *
514
-	 * @since    1.0.0
515
-	 * @access   private
516
-	 */
517
-	private function load_dependencies() {
518
-
519
-		/**
520
-		 * The class responsible for orchestrating the actions and filters of the
521
-		 * core plugin.
522
-		 */
523
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
524
-
525
-		/**
526
-		 * The class responsible for defining internationalization functionality
527
-		 * of the plugin.
528
-		 */
529
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
530
-
531
-		/**
532
-		 * WordLift's supported languages.
533
-		 */
534
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
535
-
536
-		/**
537
-		 * Provide support functions to sanitize data.
538
-		 */
539
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
540
-
541
-		/**
542
-		 * The Redirect service.
543
-		 */
544
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
545
-
546
-		/**
547
-		 * The Log service.
548
-		 */
549
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
550
-
551
-		/**
552
-		 * The configuration service.
553
-		 */
554
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
555
-
556
-		/**
557
-		 * The entity post type service (this is the WordPress post type, not the entity schema type).
558
-		 */
559
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
560
-
561
-		/**
562
-		 * The entity type service (i.e. the schema type).
563
-		 */
564
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
565
-
566
-		/**
567
-		 * The entity link service.
568
-		 */
569
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
570
-
571
-		/**
572
-		 * The Query builder.
573
-		 */
574
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
575
-
576
-		/**
577
-		 * The Schema service.
578
-		 */
579
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
580
-
581
-		/**
582
-		 * The schema:url property service.
583
-		 */
584
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
585
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
586
-
587
-		/**
588
-		 * The UI service.
589
-		 */
590
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
591
-
592
-		/**
593
-		 * The Thumbnail service.
594
-		 */
595
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
596
-
597
-		/**
598
-		 * The Entity Types Taxonomy service.
599
-		 */
600
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
601
-
602
-		/**
603
-		 * The Entity service.
604
-		 */
605
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
606
-
607
-		// Add the entity rating service.
608
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
609
-
610
-		/**
611
-		 * The User service.
612
-		 */
613
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
614
-
615
-		/**
616
-		 * The Timeline service.
617
-		 */
618
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
619
-
620
-		/**
621
-		 * The Topic Taxonomy service.
622
-		 */
623
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
624
-
625
-		/**
626
-		 * The SPARQL service.
627
-		 */
628
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
629
-
630
-		/**
631
-		 * The WordLift import service.
632
-		 */
633
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
634
-
635
-		/**
636
-		 * The WordLift URI service.
637
-		 */
638
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
639
-
640
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
641
-
642
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
643
-
644
-		/**
645
-		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
646
-		 */
647
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
648
-
649
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
650
-
651
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
652
-
653
-		/**
654
-		 * Load the converters.
655
-		 */
656
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
657
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
658
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
659
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
660
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
661
-
662
-		/**
663
-		 * Load the content filter.
664
-		 */
665
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
666
-
667
-		/**
668
-		 * Load the JSON-LD service to publish entities using JSON-LD.s
669
-		 *
670
-		 * @since 3.8.0
671
-		 */
672
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
673
-
674
-		// The Publisher Service and the AJAX adapter.
675
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
676
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
677
-
678
-		/**
679
-		 * Load the WordLift key validation service.
680
-		 */
681
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
682
-
683
-		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
684
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
685
-
686
-		/** Adapters. */
687
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
688
-
689
-		/**
690
-		 * The class responsible for defining all actions that occur in the admin area.
691
-		 */
692
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
693
-
694
-		/**
695
-		 * The class to customize the entity list admin page.
696
-		 */
697
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
698
-
699
-		/**
700
-		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
701
-		 */
702
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
703
-
704
-		/**
705
-		 * The Notice service.
706
-		 */
707
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
708
-
709
-		/**
710
-		 * The PrimaShop adapter.
711
-		 */
712
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
713
-
714
-		/**
715
-		 * The WordLift Dashboard service.
716
-		 */
717
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
718
-
719
-		/**
720
-		 * The admin 'Install wizard' page.
721
-		 */
722
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
723
-
724
-		/**
725
-		 * The WordLift entity type list admin page controller.
726
-		 */
727
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
728
-
729
-		/**
730
-		 * The WordLift entity type settings admin page controller.
731
-		 */
732
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
733
-
734
-		/**
735
-		 * The admin 'Download Your Data' page.
736
-		 */
737
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
738
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
739
-
740
-		/**
741
-		 * The admin 'Download Your Data' page.
742
-		 */
743
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
744
-
745
-		/**
746
-		 * The admin 'WordLift Settings' page.
747
-		 */
748
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
749
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
750
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
751
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
752
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
753
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
754
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
755
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
756
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
757
-
758
-		/** Admin Pages */
759
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
760
-
761
-		/**
762
-		 * The class responsible for defining all actions that occur in the public-facing
763
-		 * side of the site.
764
-		 */
765
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
766
-
767
-		/**
768
-		 * The shortcode abstract class.
769
-		 */
770
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
771
-
772
-		/**
773
-		 * The Timeline shortcode.
774
-		 */
775
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
776
-
777
-		/**
778
-		 * The Navigator shortcode.
779
-		 */
780
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
781
-
782
-		/**
783
-		 * The chord shortcode.
784
-		 */
785
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
786
-
787
-		/**
788
-		 * The geomap shortcode.
789
-		 */
790
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
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 private
218
+     * @var \Wordlift_Sparql_Service $sparql_service A {@link Wordlift_Sparql_Service} instance.
219
+     */
220
+    private $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
+     *
251
+     * @since  3.7.0
252
+     * @access private
253
+     * @var \Wordlift_Property_Factory $property_factory
254
+     */
255
+    private $property_factory;
256
+
257
+    /**
258
+     * The 'Download Your Data' page.
259
+     *
260
+     * @since  3.6.0
261
+     * @access private
262
+     * @var \Wordlift_Admin_Download_Your_Data_Page $download_your_data_page The 'Download Your Data' page.
263
+     */
264
+    private $download_your_data_page;
265
+
266
+    /**
267
+     * The 'WordLift Settings' page.
268
+     *
269
+     * @since  3.11.0
270
+     * @access protected
271
+     * @var \Wordlift_Admin_Settings_Page $settings_page The 'WordLift Settings' page.
272
+     */
273
+    protected $settings_page;
274
+
275
+    /**
276
+     * The install wizard page.
277
+     *
278
+     * @since  3.9.0
279
+     * @access private
280
+     * @var \Wordlift_Admin_Setup $admin_setup The Install wizard.
281
+     */
282
+    private $admin_setup;
283
+
284
+    /**
285
+     * The Content Filter Service hooks up to the 'the_content' filter and provides
286
+     * linking of entities to their pages.
287
+     *
288
+     * @since  3.8.0
289
+     * @access private
290
+     * @var \Wordlift_Content_Filter_Service $content_filter_service A {@link Wordlift_Content_Filter_Service} instance.
291
+     */
292
+    private $content_filter_service;
293
+
294
+    /**
295
+     * A {@link Wordlift_Key_Validation_Service} instance.
296
+     *
297
+     * @since  3.9.0
298
+     * @access private
299
+     * @var Wordlift_Key_Validation_Service $key_validation_service A {@link Wordlift_Key_Validation_Service} instance.
300
+     */
301
+    private $key_validation_service;
302
+
303
+    /**
304
+     * A {@link Wordlift_Rating_Service} instance.
305
+     *
306
+     * @since  3.10.0
307
+     * @access private
308
+     * @var \Wordlift_Rating_Service $rating_service A {@link Wordlift_Rating_Service} instance.
309
+     */
310
+    private $rating_service;
311
+
312
+    /**
313
+     * A {@link Wordlift_Post_To_Jsonld_Converter} instance.
314
+     *
315
+     * @since  3.10.0
316
+     * @access protected
317
+     * @var \Wordlift_Post_To_Jsonld_Converter $post_to_jsonld_converter A {@link Wordlift_Post_To_Jsonld_Converter} instance.
318
+     */
319
+    protected $post_to_jsonld_converter;
320
+
321
+    /**
322
+     * A {@link Wordlift_Configuration_Service} instance.
323
+     *
324
+     * @since  3.10.0
325
+     * @access protected
326
+     * @var \Wordlift_Configuration_Service $configuration_service A {@link Wordlift_Configuration_Service} instance.
327
+     */
328
+    protected $configuration_service;
329
+
330
+    /**
331
+     * A {@link Wordlift_Entity_Type_Service} instance.
332
+     *
333
+     * @since  3.10.0
334
+     * @access protected
335
+     * @var \Wordlift_Entity_Type_Service $entity_type_service A {@link Wordlift_Entity_Type_Service} instance.
336
+     */
337
+    protected $entity_type_service;
338
+
339
+    /**
340
+     * A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
341
+     *
342
+     * @since  3.10.0
343
+     * @access protected
344
+     * @var \Wordlift_Entity_Post_To_Jsonld_Converter $entity_post_to_jsonld_converter A {@link Wordlift_Entity_Post_To_Jsonld_Converter} instance.
345
+     */
346
+    protected $entity_post_to_jsonld_converter;
347
+
348
+    /**
349
+     * A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
350
+     *
351
+     * @since  3.10.0
352
+     * @access protected
353
+     * @var \Wordlift_Postid_To_Jsonld_Converter $postid_to_jsonld_converter A {@link Wordlift_Postid_To_Jsonld_Converter} instance.
354
+     */
355
+    protected $postid_to_jsonld_converter;
356
+
357
+    /**
358
+     * The {@link Wordlift_Admin_Status_Page} class.
359
+     *
360
+     * @since  3.9.8
361
+     * @access private
362
+     * @var \Wordlift_Admin_Status_Page $status_page The {@link Wordlift_Admin_Status_Page} class.
363
+     */
364
+    private $status_page;
365
+
366
+    /**
367
+     * The {@link Wordlift_Category_Taxonomy_Service} instance.
368
+     *
369
+     * @since  3.11.0
370
+     * @access protected
371
+     * @var \Wordlift_Category_Taxonomy_Service $category_taxonomy_service The {@link Wordlift_Category_Taxonomy_Service} instance.
372
+     */
373
+    protected $category_taxonomy_service;
374
+
375
+    /**
376
+     * The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
377
+     *
378
+     * @since  3.11.0
379
+     * @access protected
380
+     * @var \Wordlift_Admin_Settings_Page_Action_Link $settings_page_action_link The {@link Wordlift_Admin_Settings_Page_Action_Link} class.
381
+     */
382
+    protected $settings_page_action_link;
383
+
384
+    /**
385
+     * The {@link Wordlift_Publisher_Ajax_Adapter} instance.
386
+     *
387
+     * @since  3.11.0
388
+     * @access protected
389
+     * @var \Wordlift_Publisher_Ajax_Adapter $publisher_ajax_adapter The {@link Wordlift_Publisher_Ajax_Adapter} instance.
390
+     */
391
+    protected $publisher_ajax_adapter;
392
+
393
+    /**
394
+     * The {@link Wordlift_Admin_Input_Element} element renderer.
395
+     *
396
+     * @since  3.11.0
397
+     * @access protected
398
+     * @var \Wordlift_Admin_Input_Element $input_element The {@link Wordlift_Admin_Input_Element} element renderer.
399
+     */
400
+    protected $input_element;
401
+
402
+    /**
403
+     * The {@link Wordlift_Admin_Language_Select_Element} element renderer.
404
+     *
405
+     * @since  3.11.0
406
+     * @access protected
407
+     * @var \Wordlift_Admin_Language_Select_Element $language_select_element The {@link Wordlift_Admin_Language_Select_Element} element renderer.
408
+     */
409
+    protected $language_select_element;
410
+
411
+    /**
412
+     * The {@link Wordlift_Admin_Publisher_Element} element renderer.
413
+     *
414
+     * @since  3.11.0
415
+     * @access protected
416
+     * @var \Wordlift_Admin_Publisher_Element $publisher_element The {@link Wordlift_Admin_Publisher_Element} element renderer.
417
+     */
418
+    protected $publisher_element;
419
+
420
+    /**
421
+     * The {@link Wordlift_Admin_Select2_Element} element renderer.
422
+     *
423
+     * @since  3.11.0
424
+     * @access protected
425
+     * @var \Wordlift_Admin_Select2_Element $select2_element The {@link Wordlift_Admin_Select2_Element} element renderer.
426
+     */
427
+    protected $select2_element;
428
+
429
+    /**
430
+     * The controller for the entity type list admin page
431
+     *
432
+     * @since  3.11.0
433
+     * @access private
434
+     * @var \Wordlift_Admin_Entity_Taxonomy_List_Page $entity_type_admin_page The {@link Wordlift_Admin_Entity_Taxonomy_List_Page} class.
435
+     */
436
+    private $entity_type_admin_page;
437
+
438
+    /**
439
+     * The controller for the entity type settings admin page
440
+     *
441
+     * @since  3.11.0
442
+     * @access private
443
+     * @var \Wordlift_Admin_Entity_Type_Settings $entity_type_settings_admin_page The {@link Wordlift_Admin_Entity_Type_Settings} class.
444
+     */
445
+    private $entity_type_settings_admin_page;
446
+
447
+    /**
448
+     * The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
449
+     *
450
+     * @since  3.11.0
451
+     * @access protected
452
+     * @var \Wordlift_Related_Entities_Cloud_Widget $related_entities_cloud_widget The {@link Wordlift_Related_Entities_Cloud_Widget} instance.
453
+     */
454
+    protected $related_entities_cloud_widget;
455
+
456
+    /**
457
+     * {@link Wordlift}'s singleton instance.
458
+     *
459
+     * @since  3.11.2
460
+     *
461
+     * @since  3.11.2
462
+     * @access private
463
+     * @var Wordlift $instance {@link Wordlift}'s singleton instance.
464
+     */
465
+    private static $instance;
466
+
467
+    /**
468
+     * Define the core functionality of the plugin.
469
+     *
470
+     * Set the plugin name and the plugin version that can be used throughout the plugin.
471
+     * Load the dependencies, define the locale, and set the hooks for the admin area and
472
+     * the public-facing side of the site.
473
+     *
474
+     * @since    1.0.0
475
+     */
476
+    public function __construct() {
477
+
478
+        $this->plugin_name = 'wordlift';
479
+        $this->version     = '3.12.0-dev';
480
+        $this->load_dependencies();
481
+        $this->set_locale();
482
+        $this->define_admin_hooks();
483
+        $this->define_public_hooks();
484
+
485
+        self::$instance = $this;
486
+
487
+    }
488
+
489
+    /**
490
+     * Get the singleton instance.
491
+     *
492
+     * @since 3.11.2
493
+     *
494
+     * @return Wordlift The {@link Wordlift} singleton instance.
495
+     */
496
+    public static function get_instance() {
497
+
498
+        return self::$instance;
499
+    }
500
+
501
+    /**
502
+     * Load the required dependencies for this plugin.
503
+     *
504
+     * Include the following files that make up the plugin:
505
+     *
506
+     * - Wordlift_Loader. Orchestrates the hooks of the plugin.
507
+     * - Wordlift_i18n. Defines internationalization functionality.
508
+     * - Wordlift_Admin. Defines all hooks for the admin area.
509
+     * - Wordlift_Public. Defines all hooks for the public side of the site.
510
+     *
511
+     * Create an instance of the loader which will be used to register the hooks
512
+     * with WordPress.
513
+     *
514
+     * @since    1.0.0
515
+     * @access   private
516
+     */
517
+    private function load_dependencies() {
518
+
519
+        /**
520
+         * The class responsible for orchestrating the actions and filters of the
521
+         * core plugin.
522
+         */
523
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
524
+
525
+        /**
526
+         * The class responsible for defining internationalization functionality
527
+         * of the plugin.
528
+         */
529
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
530
+
531
+        /**
532
+         * WordLift's supported languages.
533
+         */
534
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
535
+
536
+        /**
537
+         * Provide support functions to sanitize data.
538
+         */
539
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
540
+
541
+        /**
542
+         * The Redirect service.
543
+         */
544
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
545
+
546
+        /**
547
+         * The Log service.
548
+         */
549
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
550
+
551
+        /**
552
+         * The configuration service.
553
+         */
554
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
555
+
556
+        /**
557
+         * The entity post type service (this is the WordPress post type, not the entity schema type).
558
+         */
559
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
560
+
561
+        /**
562
+         * The entity type service (i.e. the schema type).
563
+         */
564
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
565
+
566
+        /**
567
+         * The entity link service.
568
+         */
569
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
570
+
571
+        /**
572
+         * The Query builder.
573
+         */
574
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
575
+
576
+        /**
577
+         * The Schema service.
578
+         */
579
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
580
+
581
+        /**
582
+         * The schema:url property service.
583
+         */
584
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
585
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
586
+
587
+        /**
588
+         * The UI service.
589
+         */
590
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
591
+
592
+        /**
593
+         * The Thumbnail service.
594
+         */
595
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
596
+
597
+        /**
598
+         * The Entity Types Taxonomy service.
599
+         */
600
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
601
+
602
+        /**
603
+         * The Entity service.
604
+         */
605
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
606
+
607
+        // Add the entity rating service.
608
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
609
+
610
+        /**
611
+         * The User service.
612
+         */
613
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
614
+
615
+        /**
616
+         * The Timeline service.
617
+         */
618
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
619
+
620
+        /**
621
+         * The Topic Taxonomy service.
622
+         */
623
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
624
+
625
+        /**
626
+         * The SPARQL service.
627
+         */
628
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
629
+
630
+        /**
631
+         * The WordLift import service.
632
+         */
633
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
634
+
635
+        /**
636
+         * The WordLift URI service.
637
+         */
638
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
639
+
640
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
641
+
642
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
643
+
644
+        /**
645
+         * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
646
+         */
647
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
648
+
649
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
650
+
651
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
652
+
653
+        /**
654
+         * Load the converters.
655
+         */
656
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
657
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
658
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
659
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
660
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
661
+
662
+        /**
663
+         * Load the content filter.
664
+         */
665
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
666
+
667
+        /**
668
+         * Load the JSON-LD service to publish entities using JSON-LD.s
669
+         *
670
+         * @since 3.8.0
671
+         */
672
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
673
+
674
+        // The Publisher Service and the AJAX adapter.
675
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
676
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
677
+
678
+        /**
679
+         * Load the WordLift key validation service.
680
+         */
681
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
682
+
683
+        // Load the `Wordlift_Category_Taxonomy_Service` class definition.
684
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
685
+
686
+        /** Adapters. */
687
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
688
+
689
+        /**
690
+         * The class responsible for defining all actions that occur in the admin area.
691
+         */
692
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
693
+
694
+        /**
695
+         * The class to customize the entity list admin page.
696
+         */
697
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
698
+
699
+        /**
700
+         * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
701
+         */
702
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
703
+
704
+        /**
705
+         * The Notice service.
706
+         */
707
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
708
+
709
+        /**
710
+         * The PrimaShop adapter.
711
+         */
712
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
713
+
714
+        /**
715
+         * The WordLift Dashboard service.
716
+         */
717
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
718
+
719
+        /**
720
+         * The admin 'Install wizard' page.
721
+         */
722
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
723
+
724
+        /**
725
+         * The WordLift entity type list admin page controller.
726
+         */
727
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
728
+
729
+        /**
730
+         * The WordLift entity type settings admin page controller.
731
+         */
732
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
733
+
734
+        /**
735
+         * The admin 'Download Your Data' page.
736
+         */
737
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
738
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
739
+
740
+        /**
741
+         * The admin 'Download Your Data' page.
742
+         */
743
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
744
+
745
+        /**
746
+         * The admin 'WordLift Settings' page.
747
+         */
748
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
749
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
750
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
751
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
752
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
753
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
754
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
755
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
756
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
757
+
758
+        /** Admin Pages */
759
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
760
+
761
+        /**
762
+         * The class responsible for defining all actions that occur in the public-facing
763
+         * side of the site.
764
+         */
765
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
766
+
767
+        /**
768
+         * The shortcode abstract class.
769
+         */
770
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
771
+
772
+        /**
773
+         * The Timeline shortcode.
774
+         */
775
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
776
+
777
+        /**
778
+         * The Navigator shortcode.
779
+         */
780
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
781
+
782
+        /**
783
+         * The chord shortcode.
784
+         */
785
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
786
+
787
+        /**
788
+         * The geomap shortcode.
789
+         */
790
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
791 791
 
792
-		/**
793
-		 * The entity cloud shortcode.
794
-		 */
795
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
792
+        /**
793
+         * The entity cloud shortcode.
794
+         */
795
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
796 796
 
797
-		/**
798
-		 * The ShareThis service.
799
-		 */
800
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
797
+        /**
798
+         * The ShareThis service.
799
+         */
800
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
801 801
 
802
-		/**
803
-		 * The SEO service.
804
-		 */
805
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
802
+        /**
803
+         * The SEO service.
804
+         */
805
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
806 806
 
807
-		/** Widgets */
808
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
809
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
807
+        /** Widgets */
808
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
809
+        require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
810 810
 
811
-		$this->loader = new Wordlift_Loader();
811
+        $this->loader = new Wordlift_Loader();
812 812
 
813
-		// Instantiate a global logger.
814
-		global $wl_logger;
815
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
813
+        // Instantiate a global logger.
814
+        global $wl_logger;
815
+        $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
816 816
 
817
-		// Create the configuration service.
818
-		$this->configuration_service = new Wordlift_Configuration_Service();
817
+        // Create the configuration service.
818
+        $this->configuration_service = new Wordlift_Configuration_Service();
819 819
 
820
-		// Create an entity type service instance. It'll be later bound to the init action.
821
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
820
+        // Create an entity type service instance. It'll be later bound to the init action.
821
+        $this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
822 822
 
823
-		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
824
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
823
+        // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
824
+        $this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
825 825
 
826
-		// Create an instance of the UI service.
827
-		$this->ui_service = new Wordlift_UI_Service();
826
+        // Create an instance of the UI service.
827
+        $this->ui_service = new Wordlift_UI_Service();
828 828
 
829
-		// Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
830
-		$this->thumbnail_service = new Wordlift_Thumbnail_Service();
829
+        // Create an instance of the Thumbnail service. Later it'll be hooked to post meta events.
830
+        $this->thumbnail_service = new Wordlift_Thumbnail_Service();
831 831
 
832
-		$this->sparql_service = new Wordlift_Sparql_Service();
832
+        $this->sparql_service = new Wordlift_Sparql_Service();
833 833
 
834
-		// Create an instance of the Schema service.
835
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
836
-		$this->schema_service        = new Wordlift_Schema_Service();
834
+        // Create an instance of the Schema service.
835
+        $schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
836
+        $this->schema_service        = new Wordlift_Schema_Service();
837 837
 
838
-		// Create an instance of the Notice service.
839
-		$this->notice_service = new Wordlift_Notice_Service();
838
+        // Create an instance of the Notice service.
839
+        $this->notice_service = new Wordlift_Notice_Service();
840 840
 
841
-		// Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
842
-		$this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
841
+        // Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
842
+        $this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
843 843
 
844
-		// Create an instance of the User service.
845
-		$this->user_service = new Wordlift_User_Service();
844
+        // Create an instance of the User service.
845
+        $this->user_service = new Wordlift_User_Service();
846 846
 
847
-		// Create a new instance of the Timeline service and Timeline shortcode.
848
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
847
+        // Create a new instance of the Timeline service and Timeline shortcode.
848
+        $this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
849 849
 
850
-		// Create a new instance of the Redirect service.
851
-		$this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
850
+        // Create a new instance of the Redirect service.
851
+        $this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
852 852
 
853
-		// Initialize the shortcodes.
854
-		new Wordlift_Navigator_Shortcode();
855
-		new Wordlift_Chord_Shortcode();
856
-		new Wordlift_Geomap_Shortcode();
857
-		new Wordlift_Timeline_Shortcode();
858
-		new Wordlift_Related_Entities_Cloud_Shortcode();
853
+        // Initialize the shortcodes.
854
+        new Wordlift_Navigator_Shortcode();
855
+        new Wordlift_Chord_Shortcode();
856
+        new Wordlift_Geomap_Shortcode();
857
+        new Wordlift_Timeline_Shortcode();
858
+        new Wordlift_Related_Entities_Cloud_Shortcode();
859 859
 
860
-		// Initialize the SEO service.
861
-		new Wordlift_Seo_Service();
860
+        // Initialize the SEO service.
861
+        new Wordlift_Seo_Service();
862 862
 
863
-		$this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
863
+        $this->entity_types_taxonomy_walker = new Wordlift_Entity_Types_Taxonomy_Walker();
864 864
 
865
-		$this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service();
865
+        $this->topic_taxonomy_service = new Wordlift_Topic_Taxonomy_Service();
866 866
 
867
-		// Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
868
-		$this->sharethis_service = new Wordlift_ShareThis_Service();
867
+        // Create an instance of the ShareThis service, later we hook it to the_content and the_excerpt filters.
868
+        $this->sharethis_service = new Wordlift_ShareThis_Service();
869 869
 
870
-		// Create an instance of the PrimaShop adapter.
871
-		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
870
+        // Create an instance of the PrimaShop adapter.
871
+        $this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
872 872
 
873
-		// Create an import service instance to hook later to WP's import function.
874
-		$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() );
873
+        // Create an import service instance to hook later to WP's import function.
874
+        $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() );
875 875
 
876
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
876
+        $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
877 877
 
878
-		// Create a Rebuild Service instance, which we'll later bound to an ajax call.
879
-		$this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
878
+        // Create a Rebuild Service instance, which we'll later bound to an ajax call.
879
+        $this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
880 880
 
881
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
881
+        $this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
882 882
 
883
-		// Create the entity rating service.
884
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
883
+        // Create the entity rating service.
884
+        $this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
885 885
 
886
-		// Create entity list customization (wp-admin/edit.php)
887
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
886
+        // Create entity list customization (wp-admin/edit.php)
887
+        $this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
888 888
 
889
-		// Create a new instance of the Redirect service.
890
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
889
+        // Create a new instance of the Redirect service.
890
+        $this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
891 891
 
892
-		$this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
893
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
892
+        $this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
893
+        $this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
894 894
 
895
-		$attachment_service = new Wordlift_Attachment_Service();
895
+        $attachment_service = new Wordlift_Attachment_Service();
896 896
 
897
-		// Instantiate the JSON-LD service.
898
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
899
-		$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 );
900
-		$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 );
901
-		$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 );
902
-		$this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter );
897
+        // Instantiate the JSON-LD service.
898
+        $property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
899
+        $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 );
900
+        $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 );
901
+        $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 );
902
+        $this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter );
903 903
 
904
-		// Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins).
905
-		$this->key_validation_service = new Wordlift_Key_Validation_Service();
904
+        // Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins).
905
+        $this->key_validation_service = new Wordlift_Key_Validation_Service();
906 906
 
907
-		// Create an instance of the Publisher Service and the AJAX Adapter.
908
-		$publisher_service            = new Wordlift_Publisher_Service();
909
-		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
907
+        // Create an instance of the Publisher Service and the AJAX Adapter.
908
+        $publisher_service            = new Wordlift_Publisher_Service();
909
+        $this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
910 910
 
911
-		/** Adapters. */
912
-		$this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this );
911
+        /** Adapters. */
912
+        $this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this );
913 913
 
914
-		/** WordPress Admin UI. */
914
+        /** WordPress Admin UI. */
915 915
 
916
-		// UI elements.
917
-		$this->input_element           = new Wordlift_Admin_Input_Element();
918
-		$this->select2_element         = new Wordlift_Admin_Select2_Element();
919
-		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
920
-		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
921
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
916
+        // UI elements.
917
+        $this->input_element           = new Wordlift_Admin_Input_Element();
918
+        $this->select2_element         = new Wordlift_Admin_Select2_Element();
919
+        $this->language_select_element = new Wordlift_Admin_Language_Select_Element();
920
+        $tabs_element                  = new Wordlift_Admin_Tabs_Element();
921
+        $this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
922 922
 
923
-		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
924
-		$this->status_page               = new Wordlift_Admin_Status_Page();
925
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element );
926
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
923
+        $this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
924
+        $this->status_page               = new Wordlift_Admin_Status_Page();
925
+        $this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element );
926
+        $this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
927 927
 
928
-		// Pages.
929
-		new Wordlift_Admin_Post_Edit_Page( $this );
928
+        // Pages.
929
+        new Wordlift_Admin_Post_Edit_Page( $this );
930 930
 
931
-		// create an instance of the entity type list admin page controller.
932
-		$this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
931
+        // create an instance of the entity type list admin page controller.
932
+        $this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
933 933
 
934
-		// create an instance of the entity type etting admin page controller.
935
-		$this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
934
+        // create an instance of the entity type etting admin page controller.
935
+        $this->entity_type_settings_admin_page = new Wordlift_Admin_Entity_Type_Settings();
936 936
 
937
-		/** Widgets */
938
-		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
937
+        /** Widgets */
938
+        $this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
939 939
 
940
-		//** WordPress Admin */
941
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
942
-		$this->status_page             = new Wordlift_Admin_Status_Page();
940
+        //** WordPress Admin */
941
+        $this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
942
+        $this->status_page             = new Wordlift_Admin_Status_Page();
943 943
 
944
-		// Create an instance of the install wizard.
945
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
944
+        // Create an instance of the install wizard.
945
+        $this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
946 946
 
947
-		// Create an instance of the content filter service.
948
-		$this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service );
947
+        // Create an instance of the content filter service.
948
+        $this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service );
949 949
 
950
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
950
+        $this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
951 951
 
952
-		// Load the debug service if WP is in debug mode.
953
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
954
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
955
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
956
-		}
952
+        // Load the debug service if WP is in debug mode.
953
+        if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
954
+            require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
955
+            new Wordlift_Debug_Service( $this->entity_service, $uri_service );
956
+        }
957 957
 
958
-	}
958
+    }
959 959
 
960
-	/**
961
-	 * Define the locale for this plugin for internationalization.
962
-	 *
963
-	 * Uses the Wordlift_i18n class in order to set the domain and to register the hook
964
-	 * with WordPress.
965
-	 *
966
-	 * @since    1.0.0
967
-	 * @access   private
968
-	 */
969
-	private function set_locale() {
960
+    /**
961
+     * Define the locale for this plugin for internationalization.
962
+     *
963
+     * Uses the Wordlift_i18n class in order to set the domain and to register the hook
964
+     * with WordPress.
965
+     *
966
+     * @since    1.0.0
967
+     * @access   private
968
+     */
969
+    private function set_locale() {
970 970
 
971
-		$plugin_i18n = new Wordlift_i18n();
972
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
971
+        $plugin_i18n = new Wordlift_i18n();
972
+        $plugin_i18n->set_domain( $this->get_plugin_name() );
973 973
 
974
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
974
+        $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
975 975
 
976
-	}
976
+    }
977 977
 
978
-	/**
979
-	 * Register all of the hooks related to the admin area functionality
980
-	 * of the plugin.
981
-	 *
982
-	 * @since    1.0.0
983
-	 * @access   private
984
-	 */
985
-	private function define_admin_hooks() {
978
+    /**
979
+     * Register all of the hooks related to the admin area functionality
980
+     * of the plugin.
981
+     *
982
+     * @since    1.0.0
983
+     * @access   private
984
+     */
985
+    private function define_admin_hooks() {
986 986
 
987
-		$plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() );
987
+        $plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() );
988 988
 
989
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
990
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
989
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
990
+        $this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
991 991
 
992
-		// Hook the init action to the Topic Taxonomy service.
993
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
992
+        // Hook the init action to the Topic Taxonomy service.
993
+        $this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
994 994
 
995
-		// Hook the deleted_post_meta action to the Thumbnail service.
996
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
995
+        // Hook the deleted_post_meta action to the Thumbnail service.
996
+        $this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
997 997
 
998
-		// Hook the added_post_meta action to the Thumbnail service.
999
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
998
+        // Hook the added_post_meta action to the Thumbnail service.
999
+        $this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1000 1000
 
1001
-		// Hook the updated_post_meta action to the Thumbnail service.
1002
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1001
+        // Hook the updated_post_meta action to the Thumbnail service.
1002
+        $this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1003 1003
 
1004
-		// Hook posts inserts (or updates) to the user service.
1005
-		$this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1004
+        // Hook posts inserts (or updates) to the user service.
1005
+        $this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1006 1006
 
1007
-		// Hook the AJAX wl_timeline action to the Timeline service.
1008
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1007
+        // Hook the AJAX wl_timeline action to the Timeline service.
1008
+        $this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1009 1009
 
1010
-		// Register custom allowed redirect hosts.
1011
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1012
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1013
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1014
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1015
-		$this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1016
-		// Hook the AJAX wordlift_redirect action to the Redirect service.
1017
-		$this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1010
+        // Register custom allowed redirect hosts.
1011
+        $this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1012
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1013
+        $this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1014
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1015
+        $this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1016
+        // Hook the AJAX wordlift_redirect action to the Redirect service.
1017
+        $this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1018 1018
 
1019
-		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1020
-		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1021
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1022
-		$this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1019
+        // Hook save_post to the entity service to update custom fields (such as alternate labels).
1020
+        // We have a priority of 9 because we want to be executed before data is sent to Redlink.
1021
+        $this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1022
+        $this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1023 1023
 
1024
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1025
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1024
+        $this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1025
+        $this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1026 1026
 
1027
-		// Entity listing customization (wp-admin/edit.php)
1028
-		// Add custom columns
1029
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1030
-		$this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1031
-		// Add 4W selection
1032
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1033
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1027
+        // Entity listing customization (wp-admin/edit.php)
1028
+        // Add custom columns
1029
+        $this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1030
+        $this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1031
+        // Add 4W selection
1032
+        $this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1033
+        $this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1034 1034
 
1035
-		$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1035
+        $this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1036 1036
 
1037
-		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1038
-		// entities.
1039
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1037
+        // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1038
+        // entities.
1039
+        $this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1040 1040
 
1041
-		// Filter imported post meta.
1042
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1041
+        // Filter imported post meta.
1042
+        $this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1043 1043
 
1044
-		// Notify the import service when an import starts and ends.
1045
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1046
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1044
+        // Notify the import service when an import starts and ends.
1045
+        $this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1046
+        $this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1047 1047
 
1048
-		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1049
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1048
+        // Hook the AJAX wl_rebuild action to the Rebuild Service.
1049
+        $this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1050 1050
 
1051
-		// Hook the menu to the Download Your Data page.
1052
-		$this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1053
-		$this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1054
-		$this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1055
-
1056
-		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1057
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1058
-
1059
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1060
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1061
-
1062
-		// Hook the AJAX wl_validate_key action to the Key Validation service.
1063
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1064
-
1065
-		// Hook the `admin_init` function to the Admin Setup.
1066
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1067
-
1068
-		// Hook the admin_init to the settings page.
1069
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1070
-
1071
-		// Hook the menu creation on the general wordlift menu creation
1072
-		$this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1073
-
1074
-		// Hook key update.
1075
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1076
-
1077
-		// Add additional action links to the WordLift plugin in the plugins page.
1078
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1079
-
1080
-		// Hook the AJAX `wl_publisher` action name.
1081
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1082
-
1083
-		// Hook row actions for the entity type list admin.
1084
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1085
-
1086
-		/** Adapters. */
1087
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1088
-
1089
-		// Hooks to restrict multisite super admin from manipulating entity types.
1090
-		if ( is_multisite() ) {
1091
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1092
-		}
1093
-	}
1094
-
1095
-	/**
1096
-	 * Register all of the hooks related to the public-facing functionality
1097
-	 * of the plugin.
1098
-	 *
1099
-	 * @since    1.0.0
1100
-	 * @access   private
1101
-	 */
1102
-	private function define_public_hooks() {
1103
-
1104
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1105
-
1106
-		// Register the entity post type.
1107
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1108
-
1109
-		// Bind the link generation and handling hooks to the entity link service.
1110
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1111
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 );
1112
-		$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 );
1113
-		$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 );
1114
-
1115
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1116
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1117
-
1118
-		// Hook the content filter service to add entity links.
1119
-		$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1120
-
1121
-		// Hook the AJAX wl_timeline action to the Timeline service.
1122
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1123
-
1124
-		// Hook the ShareThis service.
1125
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1126
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1127
-
1128
-		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1129
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1130
-
1131
-		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1132
-		// in order to tweak WP's `WP_Query` to include entities in queries related
1133
-		// to categories.
1134
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1135
-
1136
-	}
1137
-
1138
-	/**
1139
-	 * Run the loader to execute all of the hooks with WordPress.
1140
-	 *
1141
-	 * @since    1.0.0
1142
-	 */
1143
-	public function run() {
1144
-		$this->loader->run();
1145
-	}
1146
-
1147
-	/**
1148
-	 * The name of the plugin used to uniquely identify it within the context of
1149
-	 * WordPress and to define internationalization functionality.
1150
-	 *
1151
-	 * @since     1.0.0
1152
-	 * @return    string    The name of the plugin.
1153
-	 */
1154
-	public function get_plugin_name() {
1155
-		return $this->plugin_name;
1156
-	}
1157
-
1158
-	/**
1159
-	 * The reference to the class that orchestrates the hooks with the plugin.
1160
-	 *
1161
-	 * @since     1.0.0
1162
-	 * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1163
-	 */
1164
-	public function get_loader() {
1165
-		return $this->loader;
1166
-	}
1167
-
1168
-	/**
1169
-	 * Retrieve the version number of the plugin.
1170
-	 *
1171
-	 * @since     1.0.0
1172
-	 * @return    string    The version number of the plugin.
1173
-	 */
1174
-	public function get_version() {
1175
-		return $this->version;
1176
-	}
1051
+        // Hook the menu to the Download Your Data page.
1052
+        $this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1053
+        $this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1054
+        $this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1055
+
1056
+        // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1057
+        $this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1058
+
1059
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1060
+        $this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1061
+
1062
+        // Hook the AJAX wl_validate_key action to the Key Validation service.
1063
+        $this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1064
+
1065
+        // Hook the `admin_init` function to the Admin Setup.
1066
+        $this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1067
+
1068
+        // Hook the admin_init to the settings page.
1069
+        $this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1070
+
1071
+        // Hook the menu creation on the general wordlift menu creation
1072
+        $this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1073
+
1074
+        // Hook key update.
1075
+        $this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1076
+
1077
+        // Add additional action links to the WordLift plugin in the plugins page.
1078
+        $this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1079
+
1080
+        // Hook the AJAX `wl_publisher` action name.
1081
+        $this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1082
+
1083
+        // Hook row actions for the entity type list admin.
1084
+        $this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1085
+
1086
+        /** Adapters. */
1087
+        $this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1088
+
1089
+        // Hooks to restrict multisite super admin from manipulating entity types.
1090
+        if ( is_multisite() ) {
1091
+            $this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1092
+        }
1093
+    }
1094
+
1095
+    /**
1096
+     * Register all of the hooks related to the public-facing functionality
1097
+     * of the plugin.
1098
+     *
1099
+     * @since    1.0.0
1100
+     * @access   private
1101
+     */
1102
+    private function define_public_hooks() {
1103
+
1104
+        $plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1105
+
1106
+        // Register the entity post type.
1107
+        $this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1108
+
1109
+        // Bind the link generation and handling hooks to the entity link service.
1110
+        $this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1111
+        $this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 );
1112
+        $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 );
1113
+        $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 );
1114
+
1115
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1116
+        $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1117
+
1118
+        // Hook the content filter service to add entity links.
1119
+        $this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1120
+
1121
+        // Hook the AJAX wl_timeline action to the Timeline service.
1122
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1123
+
1124
+        // Hook the ShareThis service.
1125
+        $this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1126
+        $this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1127
+
1128
+        // Hook the AJAX wl_jsonld action to the JSON-LD service.
1129
+        $this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1130
+
1131
+        // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1132
+        // in order to tweak WP's `WP_Query` to include entities in queries related
1133
+        // to categories.
1134
+        $this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1135
+
1136
+    }
1137
+
1138
+    /**
1139
+     * Run the loader to execute all of the hooks with WordPress.
1140
+     *
1141
+     * @since    1.0.0
1142
+     */
1143
+    public function run() {
1144
+        $this->loader->run();
1145
+    }
1146
+
1147
+    /**
1148
+     * The name of the plugin used to uniquely identify it within the context of
1149
+     * WordPress and to define internationalization functionality.
1150
+     *
1151
+     * @since     1.0.0
1152
+     * @return    string    The name of the plugin.
1153
+     */
1154
+    public function get_plugin_name() {
1155
+        return $this->plugin_name;
1156
+    }
1157
+
1158
+    /**
1159
+     * The reference to the class that orchestrates the hooks with the plugin.
1160
+     *
1161
+     * @since     1.0.0
1162
+     * @return    Wordlift_Loader    Orchestrates the hooks of the plugin.
1163
+     */
1164
+    public function get_loader() {
1165
+        return $this->loader;
1166
+    }
1167
+
1168
+    /**
1169
+     * Retrieve the version number of the plugin.
1170
+     *
1171
+     * @since     1.0.0
1172
+     * @return    string    The version number of the plugin.
1173
+     */
1174
+    public function get_version() {
1175
+        return $this->version;
1176
+    }
1177 1177
 
1178 1178
 }
Please login to merge, or discard this patch.
Spacing   +169 added lines, -169 removed lines patch added patch discarded remove patch
@@ -520,308 +520,308 @@  discard block
 block discarded – undo
520 520
 		 * The class responsible for orchestrating the actions and filters of the
521 521
 		 * core plugin.
522 522
 		 */
523
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-loader.php';
523
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-loader.php';
524 524
 
525 525
 		/**
526 526
 		 * The class responsible for defining internationalization functionality
527 527
 		 * of the plugin.
528 528
 		 */
529
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-i18n.php';
529
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-i18n.php';
530 530
 
531 531
 		/**
532 532
 		 * WordLift's supported languages.
533 533
 		 */
534
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-languages.php';
534
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-languages.php';
535 535
 
536 536
 		/**
537 537
 		 * Provide support functions to sanitize data.
538 538
 		 */
539
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sanitizer.php';
539
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sanitizer.php';
540 540
 
541 541
 		/**
542 542
 		 * The Redirect service.
543 543
 		 */
544
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-redirect-service.php';
544
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-redirect-service.php';
545 545
 
546 546
 		/**
547 547
 		 * The Log service.
548 548
 		 */
549
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-log-service.php';
549
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-log-service.php';
550 550
 
551 551
 		/**
552 552
 		 * The configuration service.
553 553
 		 */
554
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-configuration-service.php';
554
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-configuration-service.php';
555 555
 
556 556
 		/**
557 557
 		 * The entity post type service (this is the WordPress post type, not the entity schema type).
558 558
 		 */
559
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-type-service.php';
559
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-type-service.php';
560 560
 
561 561
 		/**
562 562
 		 * The entity type service (i.e. the schema type).
563 563
 		 */
564
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-type-service.php';
564
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-type-service.php';
565 565
 
566 566
 		/**
567 567
 		 * The entity link service.
568 568
 		 */
569
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-link-service.php';
569
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-link-service.php';
570 570
 
571 571
 		/**
572 572
 		 * The Query builder.
573 573
 		 */
574
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-query-builder.php';
574
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-query-builder.php';
575 575
 
576 576
 		/**
577 577
 		 * The Schema service.
578 578
 		 */
579
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-service.php';
579
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-service.php';
580 580
 
581 581
 		/**
582 582
 		 * The schema:url property service.
583 583
 		 */
584
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-service.php';
585
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-schema-url-property-service.php';
584
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-service.php';
585
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-schema-url-property-service.php';
586 586
 
587 587
 		/**
588 588
 		 * The UI service.
589 589
 		 */
590
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-ui-service.php';
590
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-ui-service.php';
591 591
 
592 592
 		/**
593 593
 		 * The Thumbnail service.
594 594
 		 */
595
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-thumbnail-service.php';
595
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-thumbnail-service.php';
596 596
 
597 597
 		/**
598 598
 		 * The Entity Types Taxonomy service.
599 599
 		 */
600
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-types-taxonomy-service.php';
600
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-types-taxonomy-service.php';
601 601
 
602 602
 		/**
603 603
 		 * The Entity service.
604 604
 		 */
605
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-service.php';
605
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-service.php';
606 606
 
607 607
 		// Add the entity rating service.
608
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rating-service.php';
608
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-rating-service.php';
609 609
 
610 610
 		/**
611 611
 		 * The User service.
612 612
 		 */
613
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-user-service.php';
613
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-user-service.php';
614 614
 
615 615
 		/**
616 616
 		 * The Timeline service.
617 617
 		 */
618
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-timeline-service.php';
618
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-timeline-service.php';
619 619
 
620 620
 		/**
621 621
 		 * The Topic Taxonomy service.
622 622
 		 */
623
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-topic-taxonomy-service.php';
623
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-topic-taxonomy-service.php';
624 624
 
625 625
 		/**
626 626
 		 * The SPARQL service.
627 627
 		 */
628
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-sparql-service.php';
628
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-sparql-service.php';
629 629
 
630 630
 		/**
631 631
 		 * The WordLift import service.
632 632
 		 */
633
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-import-service.php';
633
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-import-service.php';
634 634
 
635 635
 		/**
636 636
 		 * The WordLift URI service.
637 637
 		 */
638
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-uri-service.php';
638
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-uri-service.php';
639 639
 
640
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-listable.php';
640
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-listable.php';
641 641
 
642
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-property-factory.php';
642
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-property-factory.php';
643 643
 
644 644
 		/**
645 645
 		 * The WordLift rebuild service, used to rebuild the remote dataset using the local data.
646 646
 		 */
647
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-rebuild-service.php';
647
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-rebuild-service.php';
648 648
 
649
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/properties/class-wordlift-property-getter-factory.php';
649
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/properties/class-wordlift-property-getter-factory.php';
650 650
 
651
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-attachment-service.php';
651
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-attachment-service.php';
652 652
 
653 653
 		/**
654 654
 		 * Load the converters.
655 655
 		 */
656
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/intf-wordlift-post-converter.php';
657
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
658
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-postid-to-jsonld-converter.php';
659
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php';
660
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-post-to-jsonld-converter.php';
656
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/intf-wordlift-post-converter.php';
657
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-abstract-post-to-jsonld-converter.php';
658
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-postid-to-jsonld-converter.php';
659
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-entity-post-to-jsonld-converter.php';
660
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-post-to-jsonld-converter.php';
661 661
 
662 662
 		/**
663 663
 		 * Load the content filter.
664 664
 		 */
665
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-content-filter-service.php';
665
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-content-filter-service.php';
666 666
 
667 667
 		/**
668 668
 		 * Load the JSON-LD service to publish entities using JSON-LD.s
669 669
 		 *
670 670
 		 * @since 3.8.0
671 671
 		 */
672
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-jsonld-service.php';
672
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-jsonld-service.php';
673 673
 
674 674
 		// The Publisher Service and the AJAX adapter.
675
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-service.php';
676
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-publisher-ajax-adapter.php';
675
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-service.php';
676
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-publisher-ajax-adapter.php';
677 677
 
678 678
 		/**
679 679
 		 * Load the WordLift key validation service.
680 680
 		 */
681
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-key-validation-service.php';
681
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-key-validation-service.php';
682 682
 
683 683
 		// Load the `Wordlift_Category_Taxonomy_Service` class definition.
684
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-category-taxonomy-service.php';
684
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-category-taxonomy-service.php';
685 685
 
686 686
 		/** Adapters. */
687
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-tinymce-adapter.php';
687
+		require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-tinymce-adapter.php';
688 688
 
689 689
 		/**
690 690
 		 * The class responsible for defining all actions that occur in the admin area.
691 691
 		 */
692
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin.php';
692
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin.php';
693 693
 
694 694
 		/**
695 695
 		 * The class to customize the entity list admin page.
696 696
 		 */
697
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-list.php';
697
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-list.php';
698 698
 
699 699
 		/**
700 700
 		 * The Entity Types Taxonomy Walker (transforms checkboxes into radios).
701 701
 		 */
702
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php';
702
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-types-taxonomy-walker.php';
703 703
 
704 704
 		/**
705 705
 		 * The Notice service.
706 706
 		 */
707
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-notice-service.php';
707
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-notice-service.php';
708 708
 
709 709
 		/**
710 710
 		 * The PrimaShop adapter.
711 711
 		 */
712
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-primashop-adapter.php';
712
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-primashop-adapter.php';
713 713
 
714 714
 		/**
715 715
 		 * The WordLift Dashboard service.
716 716
 		 */
717
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-dashboard.php';
717
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-dashboard.php';
718 718
 
719 719
 		/**
720 720
 		 * The admin 'Install wizard' page.
721 721
 		 */
722
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-setup.php';
722
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-setup.php';
723 723
 
724 724
 		/**
725 725
 		 * The WordLift entity type list admin page controller.
726 726
 		 */
727
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
727
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-entity-taxonomy-list-page.php';
728 728
 
729 729
 		/**
730 730
 		 * The WordLift entity type settings admin page controller.
731 731
 		 */
732
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-entity-type-settings.php';
732
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-entity-type-settings.php';
733 733
 
734 734
 		/**
735 735
 		 * The admin 'Download Your Data' page.
736 736
 		 */
737
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
738
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-status-page.php';
737
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-download-your-data-page.php';
738
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-status-page.php';
739 739
 
740 740
 		/**
741 741
 		 * The admin 'Download Your Data' page.
742 742
 		 */
743
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-download-your-data-page.php';
743
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-download-your-data-page.php';
744 744
 
745 745
 		/**
746 746
 		 * The admin 'WordLift Settings' page.
747 747
 		 */
748
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/intf-wordlift-admin-element.php';
749
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-input-element.php';
750
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-select2-element.php';
751
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-language-select-element.php';
752
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-tabs-element.php';
753
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-publisher-element.php';
754
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-page.php';
755
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page.php';
756
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-settings-page-action-link.php';
748
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/intf-wordlift-admin-element.php';
749
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-input-element.php';
750
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-select2-element.php';
751
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-language-select-element.php';
752
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-tabs-element.php';
753
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-publisher-element.php';
754
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-page.php';
755
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page.php';
756
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-settings-page-action-link.php';
757 757
 
758 758
 		/** Admin Pages */
759
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-wordlift-admin-post-edit-page.php';
759
+		require_once plugin_dir_path(dirname(__FILE__)).'admin/class-wordlift-admin-post-edit-page.php';
760 760
 
761 761
 		/**
762 762
 		 * The class responsible for defining all actions that occur in the public-facing
763 763
 		 * side of the site.
764 764
 		 */
765
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-public.php';
765
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-public.php';
766 766
 
767 767
 		/**
768 768
 		 * The shortcode abstract class.
769 769
 		 */
770
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-shortcode.php';
770
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-shortcode.php';
771 771
 
772 772
 		/**
773 773
 		 * The Timeline shortcode.
774 774
 		 */
775
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-timeline-shortcode.php';
775
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-timeline-shortcode.php';
776 776
 
777 777
 		/**
778 778
 		 * The Navigator shortcode.
779 779
 		 */
780
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-navigator-shortcode.php';
780
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-navigator-shortcode.php';
781 781
 
782 782
 		/**
783 783
 		 * The chord shortcode.
784 784
 		 */
785
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-chord-shortcode.php';
785
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-chord-shortcode.php';
786 786
 
787 787
 		/**
788 788
 		 * The geomap shortcode.
789 789
 		 */
790
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-geomap-shortcode.php';
790
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-geomap-shortcode.php';
791 791
 
792 792
 		/**
793 793
 		 * The entity cloud shortcode.
794 794
 		 */
795
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-shortcode.php';
795
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-shortcode.php';
796 796
 
797 797
 		/**
798 798
 		 * The ShareThis service.
799 799
 		 */
800
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-sharethis-service.php';
800
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-sharethis-service.php';
801 801
 
802 802
 		/**
803 803
 		 * The SEO service.
804 804
 		 */
805
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-seo-service.php';
805
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-seo-service.php';
806 806
 
807 807
 		/** Widgets */
808
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-widget.php';
809
-		require_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-wordlift-related-entities-cloud-widget.php';
808
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-widget.php';
809
+		require_once plugin_dir_path(dirname(__FILE__)).'public/class-wordlift-related-entities-cloud-widget.php';
810 810
 
811 811
 		$this->loader = new Wordlift_Loader();
812 812
 
813 813
 		// Instantiate a global logger.
814 814
 		global $wl_logger;
815
-		$wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' );
815
+		$wl_logger = Wordlift_Log_Service::get_logger('WordLift');
816 816
 
817 817
 		// Create the configuration service.
818 818
 		$this->configuration_service = new Wordlift_Configuration_Service();
819 819
 
820 820
 		// Create an entity type service instance. It'll be later bound to the init action.
821
-		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service( Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path() );
821
+		$this->entity_post_type_service = new Wordlift_Entity_Post_Type_Service(Wordlift_Entity_Service::TYPE_NAME, $this->configuration_service->get_entity_base_path());
822 822
 
823 823
 		// Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions.
824
-		$this->entity_link_service = new Wordlift_Entity_Link_Service( $this->entity_post_type_service, $this->configuration_service->get_entity_base_path() );
824
+		$this->entity_link_service = new Wordlift_Entity_Link_Service($this->entity_post_type_service, $this->configuration_service->get_entity_base_path());
825 825
 
826 826
 		// Create an instance of the UI service.
827 827
 		$this->ui_service = new Wordlift_UI_Service();
@@ -832,23 +832,23 @@  discard block
 block discarded – undo
832 832
 		$this->sparql_service = new Wordlift_Sparql_Service();
833 833
 
834 834
 		// Create an instance of the Schema service.
835
-		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service( $this->sparql_service );
835
+		$schema_url_property_service = new Wordlift_Schema_Url_Property_Service($this->sparql_service);
836 836
 		$this->schema_service        = new Wordlift_Schema_Service();
837 837
 
838 838
 		// Create an instance of the Notice service.
839 839
 		$this->notice_service = new Wordlift_Notice_Service();
840 840
 
841 841
 		// Create an instance of the Entity service, passing the UI service to draw parts of the Entity admin page.
842
-		$this->entity_service = new Wordlift_Entity_Service( $this->ui_service );
842
+		$this->entity_service = new Wordlift_Entity_Service($this->ui_service);
843 843
 
844 844
 		// Create an instance of the User service.
845 845
 		$this->user_service = new Wordlift_User_Service();
846 846
 
847 847
 		// Create a new instance of the Timeline service and Timeline shortcode.
848
-		$this->timeline_service = new Wordlift_Timeline_Service( $this->entity_service );
848
+		$this->timeline_service = new Wordlift_Timeline_Service($this->entity_service);
849 849
 
850 850
 		// Create a new instance of the Redirect service.
851
-		$this->redirect_service = new Wordlift_Redirect_Service( $this->entity_service );
851
+		$this->redirect_service = new Wordlift_Redirect_Service($this->entity_service);
852 852
 
853 853
 		// Initialize the shortcodes.
854 854
 		new Wordlift_Navigator_Shortcode();
@@ -871,45 +871,45 @@  discard block
 block discarded – undo
871 871
 		$this->primashop_adapter = new Wordlift_PrimaShop_Adapter();
872 872
 
873 873
 		// Create an import service instance to hook later to WP's import function.
874
-		$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() );
874
+		$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());
875 875
 
876
-		$uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] );
876
+		$uri_service = new Wordlift_Uri_Service($GLOBALS['wpdb']);
877 877
 
878 878
 		// Create a Rebuild Service instance, which we'll later bound to an ajax call.
879
-		$this->rebuild_service = new Wordlift_Rebuild_Service( $this->sparql_service, $uri_service );
879
+		$this->rebuild_service = new Wordlift_Rebuild_Service($this->sparql_service, $uri_service);
880 880
 
881
-		$this->entity_type_service = new Wordlift_Entity_Type_Service( $this->schema_service );
881
+		$this->entity_type_service = new Wordlift_Entity_Type_Service($this->schema_service);
882 882
 
883 883
 		// Create the entity rating service.
884
-		$this->rating_service = new Wordlift_Rating_Service( $this->entity_service, $this->entity_type_service, $this->notice_service );
884
+		$this->rating_service = new Wordlift_Rating_Service($this->entity_service, $this->entity_type_service, $this->notice_service);
885 885
 
886 886
 		// Create entity list customization (wp-admin/edit.php)
887
-		$this->entity_list_service = new Wordlift_Entity_List_Service( $this->rating_service );
887
+		$this->entity_list_service = new Wordlift_Entity_List_Service($this->rating_service);
888 888
 
889 889
 		// Create a new instance of the Redirect service.
890
-		$this->dashboard_service = new Wordlift_Dashboard_Service( $this->rating_service );
890
+		$this->dashboard_service = new Wordlift_Dashboard_Service($this->rating_service);
891 891
 
892
-		$this->property_factory = new Wordlift_Property_Factory( $schema_url_property_service );
893
-		$this->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service );
892
+		$this->property_factory = new Wordlift_Property_Factory($schema_url_property_service);
893
+		$this->property_factory->register(Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service);
894 894
 
895 895
 		$attachment_service = new Wordlift_Attachment_Service();
896 896
 
897 897
 		// Instantiate the JSON-LD service.
898
-		$property_getter                       = Wordlift_Property_Getter_Factory::create( $this->entity_service );
899
-		$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 );
900
-		$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 );
901
-		$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 );
902
-		$this->jsonld_service                  = new Wordlift_Jsonld_Service( $this->entity_service, $this->postid_to_jsonld_converter );
898
+		$property_getter                       = Wordlift_Property_Getter_Factory::create($this->entity_service);
899
+		$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);
900
+		$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);
901
+		$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);
902
+		$this->jsonld_service                  = new Wordlift_Jsonld_Service($this->entity_service, $this->postid_to_jsonld_converter);
903 903
 
904 904
 		// Create an instance of the Key Validation service. This service is later hooked to provide an AJAX call (only for admins).
905 905
 		$this->key_validation_service = new Wordlift_Key_Validation_Service();
906 906
 
907 907
 		// Create an instance of the Publisher Service and the AJAX Adapter.
908 908
 		$publisher_service            = new Wordlift_Publisher_Service();
909
-		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $publisher_service );
909
+		$this->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter($publisher_service);
910 910
 
911 911
 		/** Adapters. */
912
-		$this->tinymce_adapter = new Wordlift_Tinymce_Adapter( $this );
912
+		$this->tinymce_adapter = new Wordlift_Tinymce_Adapter($this);
913 913
 
914 914
 		/** WordPress Admin UI. */
915 915
 
@@ -918,15 +918,15 @@  discard block
 block discarded – undo
918 918
 		$this->select2_element         = new Wordlift_Admin_Select2_Element();
919 919
 		$this->language_select_element = new Wordlift_Admin_Language_Select_Element();
920 920
 		$tabs_element                  = new Wordlift_Admin_Tabs_Element();
921
-		$this->publisher_element       = new Wordlift_Admin_Publisher_Element( $this->configuration_service, $publisher_service, $tabs_element, $this->select2_element );
921
+		$this->publisher_element       = new Wordlift_Admin_Publisher_Element($this->configuration_service, $publisher_service, $tabs_element, $this->select2_element);
922 922
 
923
-		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
923
+		$this->download_your_data_page   = new Wordlift_Admin_Download_Your_Data_Page($this->configuration_service);
924 924
 		$this->status_page               = new Wordlift_Admin_Status_Page();
925
-		$this->settings_page             = new Wordlift_Admin_Settings_Page( $this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element );
926
-		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $this->settings_page );
925
+		$this->settings_page             = new Wordlift_Admin_Settings_Page($this->configuration_service, $this->entity_service, $this->input_element, $this->language_select_element, $this->publisher_element);
926
+		$this->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link($this->settings_page);
927 927
 
928 928
 		// Pages.
929
-		new Wordlift_Admin_Post_Edit_Page( $this );
929
+		new Wordlift_Admin_Post_Edit_Page($this);
930 930
 
931 931
 		// create an instance of the entity type list admin page controller.
932 932
 		$this->entity_type_admin_page = new Wordlift_Admin_Entity_Taxonomy_List_Page();
@@ -938,21 +938,21 @@  discard block
 block discarded – undo
938 938
 		$this->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget();
939 939
 
940 940
 		//** WordPress Admin */
941
-		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page( $this->configuration_service );
941
+		$this->download_your_data_page = new Wordlift_Admin_Download_Your_Data_Page($this->configuration_service);
942 942
 		$this->status_page             = new Wordlift_Admin_Status_Page();
943 943
 
944 944
 		// Create an instance of the install wizard.
945
-		$this->admin_setup = new Wordlift_Admin_Setup( $this->configuration_service, $this->key_validation_service, $this->entity_service );
945
+		$this->admin_setup = new Wordlift_Admin_Setup($this->configuration_service, $this->key_validation_service, $this->entity_service);
946 946
 
947 947
 		// Create an instance of the content filter service.
948
-		$this->content_filter_service = new Wordlift_Content_Filter_Service( $this->entity_service );
948
+		$this->content_filter_service = new Wordlift_Content_Filter_Service($this->entity_service);
949 949
 
950
-		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $this->entity_post_type_service );
950
+		$this->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service($this->entity_post_type_service);
951 951
 
952 952
 		// Load the debug service if WP is in debug mode.
953
-		if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {
954
-			require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-wordlift-debug-service.php';
955
-			new Wordlift_Debug_Service( $this->entity_service, $uri_service );
953
+		if (defined('WP_DEBUG') && WP_DEBUG) {
954
+			require_once plugin_dir_path(dirname(__FILE__)).'includes/class-wordlift-debug-service.php';
955
+			new Wordlift_Debug_Service($this->entity_service, $uri_service);
956 956
 		}
957 957
 
958 958
 	}
@@ -969,9 +969,9 @@  discard block
 block discarded – undo
969 969
 	private function set_locale() {
970 970
 
971 971
 		$plugin_i18n = new Wordlift_i18n();
972
-		$plugin_i18n->set_domain( $this->get_plugin_name() );
972
+		$plugin_i18n->set_domain($this->get_plugin_name());
973 973
 
974
-		$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );
974
+		$this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain');
975 975
 
976 976
 	}
977 977
 
@@ -984,111 +984,111 @@  discard block
 block discarded – undo
984 984
 	 */
985 985
 	private function define_admin_hooks() {
986 986
 
987
-		$plugin_admin = new Wordlift_Admin( $this->get_plugin_name(), $this->get_version() );
987
+		$plugin_admin = new Wordlift_Admin($this->get_plugin_name(), $this->get_version());
988 988
 
989
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' );
990
-		$this->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts' );
989
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles');
990
+		$this->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts');
991 991
 
992 992
 		// Hook the init action to the Topic Taxonomy service.
993
-		$this->loader->add_action( 'init', $this->topic_taxonomy_service, 'init', 0 );
993
+		$this->loader->add_action('init', $this->topic_taxonomy_service, 'init', 0);
994 994
 
995 995
 		// Hook the deleted_post_meta action to the Thumbnail service.
996
-		$this->loader->add_action( 'deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4 );
996
+		$this->loader->add_action('deleted_post_meta', $this->thumbnail_service, 'deleted_post_meta', 10, 4);
997 997
 
998 998
 		// Hook the added_post_meta action to the Thumbnail service.
999
-		$this->loader->add_action( 'added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
999
+		$this->loader->add_action('added_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4);
1000 1000
 
1001 1001
 		// Hook the updated_post_meta action to the Thumbnail service.
1002
-		$this->loader->add_action( 'updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4 );
1002
+		$this->loader->add_action('updated_post_meta', $this->thumbnail_service, 'added_or_updated_post_meta', 10, 4);
1003 1003
 
1004 1004
 		// Hook posts inserts (or updates) to the user service.
1005
-		$this->loader->add_action( 'wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3 );
1005
+		$this->loader->add_action('wp_insert_post', $this->user_service, 'wp_insert_post', 10, 3);
1006 1006
 
1007 1007
 		// Hook the AJAX wl_timeline action to the Timeline service.
1008
-		$this->loader->add_action( 'wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1008
+		$this->loader->add_action('wp_ajax_wl_timeline', $this->timeline_service, 'ajax_timeline');
1009 1009
 
1010 1010
 		// Register custom allowed redirect hosts.
1011
-		$this->loader->add_filter( 'allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts' );
1011
+		$this->loader->add_filter('allowed_redirect_hosts', $this->redirect_service, 'allowed_redirect_hosts');
1012 1012
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1013
-		$this->loader->add_action( 'wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect' );
1013
+		$this->loader->add_action('wp_ajax_wordlift_redirect', $this->redirect_service, 'ajax_redirect');
1014 1014
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1015
-		$this->loader->add_action( 'wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats' );
1015
+		$this->loader->add_action('wp_ajax_wordlift_get_stats', $this->dashboard_service, 'ajax_get_stats');
1016 1016
 		// Hook the AJAX wordlift_redirect action to the Redirect service.
1017
-		$this->loader->add_action( 'wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets' );
1017
+		$this->loader->add_action('wp_dashboard_setup', $this->dashboard_service, 'add_dashboard_widgets');
1018 1018
 
1019 1019
 		// Hook save_post to the entity service to update custom fields (such as alternate labels).
1020 1020
 		// We have a priority of 9 because we want to be executed before data is sent to Redlink.
1021
-		$this->loader->add_action( 'save_post', $this->entity_service, 'save_post', 9, 3 );
1022
-		$this->loader->add_action( 'save_post_entity', $this->rating_service, 'set_rating_for', 10, 1 );
1021
+		$this->loader->add_action('save_post', $this->entity_service, 'save_post', 9, 3);
1022
+		$this->loader->add_action('save_post_entity', $this->rating_service, 'set_rating_for', 10, 1);
1023 1023
 
1024
-		$this->loader->add_action( 'edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1 );
1025
-		$this->loader->add_action( 'in_admin_header', $this->rating_service, 'in_admin_header' );
1024
+		$this->loader->add_action('edit_form_before_permalink', $this->entity_service, 'edit_form_before_permalink', 10, 1);
1025
+		$this->loader->add_action('in_admin_header', $this->rating_service, 'in_admin_header');
1026 1026
 
1027 1027
 		// Entity listing customization (wp-admin/edit.php)
1028 1028
 		// Add custom columns
1029
-		$this->loader->add_filter( 'manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns' );
1030
-		$this->loader->add_filter( 'manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2 );
1029
+		$this->loader->add_filter('manage_entity_posts_columns', $this->entity_list_service, 'register_custom_columns');
1030
+		$this->loader->add_filter('manage_entity_posts_custom_column', $this->entity_list_service, 'render_custom_columns', 10, 2);
1031 1031
 		// Add 4W selection
1032
-		$this->loader->add_action( 'restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope' );
1033
-		$this->loader->add_filter( 'posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope' );
1032
+		$this->loader->add_action('restrict_manage_posts', $this->entity_list_service, 'restrict_manage_posts_classification_scope');
1033
+		$this->loader->add_filter('posts_clauses', $this->entity_list_service, 'posts_clauses_classification_scope');
1034 1034
 
1035
-		$this->loader->add_filter( 'wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args' );
1035
+		$this->loader->add_filter('wp_terms_checklist_args', $this->entity_types_taxonomy_walker, 'terms_checklist_args');
1036 1036
 
1037 1037
 		// Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for
1038 1038
 		// entities.
1039
-		$this->loader->add_filter( 'prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2 );
1039
+		$this->loader->add_filter('prima_metabox_entity_header_args', $this->primashop_adapter, 'prima_metabox_entity_header_args', 10, 2);
1040 1040
 
1041 1041
 		// Filter imported post meta.
1042
-		$this->loader->add_filter( 'wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3 );
1042
+		$this->loader->add_filter('wp_import_post_meta', $this->import_service, 'wp_import_post_meta', 10, 3);
1043 1043
 
1044 1044
 		// Notify the import service when an import starts and ends.
1045
-		$this->loader->add_action( 'import_start', $this->import_service, 'import_start', 10, 0 );
1046
-		$this->loader->add_action( 'import_end', $this->import_service, 'import_end', 10, 0 );
1045
+		$this->loader->add_action('import_start', $this->import_service, 'import_start', 10, 0);
1046
+		$this->loader->add_action('import_end', $this->import_service, 'import_end', 10, 0);
1047 1047
 
1048 1048
 		// Hook the AJAX wl_rebuild action to the Rebuild Service.
1049
-		$this->loader->add_action( 'wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild' );
1049
+		$this->loader->add_action('wp_ajax_wl_rebuild', $this->rebuild_service, 'rebuild');
1050 1050
 
1051 1051
 		// Hook the menu to the Download Your Data page.
1052
-		$this->loader->add_action( 'admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0 );
1053
-		$this->loader->add_action( 'admin_menu', $this->status_page, 'admin_menu', 100, 0 );
1054
-		$this->loader->add_action( 'admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0 );
1052
+		$this->loader->add_action('admin_menu', $this->download_your_data_page, 'admin_menu', 100, 0);
1053
+		$this->loader->add_action('admin_menu', $this->status_page, 'admin_menu', 100, 0);
1054
+		$this->loader->add_action('admin_menu', $this->entity_type_settings_admin_page, 'admin_menu', 100, 0);
1055 1055
 
1056 1056
 		// Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links.
1057
-		$this->loader->add_action( 'wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10 );
1057
+		$this->loader->add_action('wp_ajax_wl_download_your_data', $this->download_your_data_page, 'download_your_data', 10);
1058 1058
 
1059 1059
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1060
-		$this->loader->add_action( 'wp_ajax_wl_jsonld', $this->jsonld_service, 'get' );
1060
+		$this->loader->add_action('wp_ajax_wl_jsonld', $this->jsonld_service, 'get');
1061 1061
 
1062 1062
 		// Hook the AJAX wl_validate_key action to the Key Validation service.
1063
-		$this->loader->add_action( 'wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key' );
1063
+		$this->loader->add_action('wp_ajax_wl_validate_key', $this->key_validation_service, 'validate_key');
1064 1064
 
1065 1065
 		// Hook the `admin_init` function to the Admin Setup.
1066
-		$this->loader->add_action( 'admin_init', $this->admin_setup, 'admin_init' );
1066
+		$this->loader->add_action('admin_init', $this->admin_setup, 'admin_init');
1067 1067
 
1068 1068
 		// Hook the admin_init to the settings page.
1069
-		$this->loader->add_action( 'admin_init', $this->settings_page, 'admin_init' );
1069
+		$this->loader->add_action('admin_init', $this->settings_page, 'admin_init');
1070 1070
 
1071 1071
 		// Hook the menu creation on the general wordlift menu creation
1072
-		$this->loader->add_action( 'wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2 );
1072
+		$this->loader->add_action('wl_admin_menu', $this->settings_page, 'admin_menu', 10, 2);
1073 1073
 
1074 1074
 		// Hook key update.
1075
-		$this->loader->add_action( 'update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2 );
1075
+		$this->loader->add_action('update_option_wl_general_settings', $this->configuration_service, 'update_key', 10, 2);
1076 1076
 
1077 1077
 		// Add additional action links to the WordLift plugin in the plugins page.
1078
-		$this->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1 );
1078
+		$this->loader->add_filter('plugin_action_links_wordlift/wordlift.php', $this->settings_page_action_link, 'action_links', 10, 1);
1079 1079
 
1080 1080
 		// Hook the AJAX `wl_publisher` action name.
1081
-		$this->loader->add_action( 'wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher' );
1081
+		$this->loader->add_action('wp_ajax_wl_publisher', $this->publisher_ajax_adapter, 'publisher');
1082 1082
 
1083 1083
 		// Hook row actions for the entity type list admin.
1084
-		$this->loader->add_filter( 'wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 );
1084
+		$this->loader->add_filter('wl_entity_type_row_actions', $this->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2);
1085 1085
 
1086 1086
 		/** Adapters. */
1087
-		$this->loader->add_filter( 'mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1 );
1087
+		$this->loader->add_filter('mce_external_plugins', $this->tinymce_adapter, 'mce_external_plugins', 10, 1);
1088 1088
 
1089 1089
 		// Hooks to restrict multisite super admin from manipulating entity types.
1090
-		if ( is_multisite() ) {
1091
-			$this->loader->add_filter( 'map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4 );
1090
+		if (is_multisite()) {
1091
+			$this->loader->add_filter('map_meta_cap', $this->entity_type_admin_page, 'restrict_super_admin', 10, 4);
1092 1092
 		}
1093 1093
 	}
1094 1094
 
@@ -1101,37 +1101,37 @@  discard block
 block discarded – undo
1101 1101
 	 */
1102 1102
 	private function define_public_hooks() {
1103 1103
 
1104
-		$plugin_public = new Wordlift_Public( $this->get_plugin_name(), $this->get_version() );
1104
+		$plugin_public = new Wordlift_Public($this->get_plugin_name(), $this->get_version());
1105 1105
 
1106 1106
 		// Register the entity post type.
1107
-		$this->loader->add_action( 'init', $this->entity_post_type_service, 'register' );
1107
+		$this->loader->add_action('init', $this->entity_post_type_service, 'register');
1108 1108
 
1109 1109
 		// Bind the link generation and handling hooks to the entity link service.
1110
-		$this->loader->add_filter( 'post_type_link', $this->entity_link_service, 'post_type_link', 10, 4 );
1111
-		$this->loader->add_action( 'pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1 );
1112
-		$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 );
1113
-		$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 );
1110
+		$this->loader->add_filter('post_type_link', $this->entity_link_service, 'post_type_link', 10, 4);
1111
+		$this->loader->add_action('pre_get_posts', $this->entity_link_service, 'pre_get_posts', 10, 1);
1112
+		$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);
1113
+		$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);
1114 1114
 
1115
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
1116
-		$this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
1115
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles');
1116
+		$this->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts');
1117 1117
 
1118 1118
 		// Hook the content filter service to add entity links.
1119
-		$this->loader->add_filter( 'the_content', $this->content_filter_service, 'the_content' );
1119
+		$this->loader->add_filter('the_content', $this->content_filter_service, 'the_content');
1120 1120
 
1121 1121
 		// Hook the AJAX wl_timeline action to the Timeline service.
1122
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline' );
1122
+		$this->loader->add_action('wp_ajax_nopriv_wl_timeline', $this->timeline_service, 'ajax_timeline');
1123 1123
 
1124 1124
 		// Hook the ShareThis service.
1125
-		$this->loader->add_filter( 'the_content', $this->sharethis_service, 'the_content', 99 );
1126
-		$this->loader->add_filter( 'the_excerpt', $this->sharethis_service, 'the_excerpt', 99 );
1125
+		$this->loader->add_filter('the_content', $this->sharethis_service, 'the_content', 99);
1126
+		$this->loader->add_filter('the_excerpt', $this->sharethis_service, 'the_excerpt', 99);
1127 1127
 
1128 1128
 		// Hook the AJAX wl_jsonld action to the JSON-LD service.
1129
-		$this->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get' );
1129
+		$this->loader->add_action('wp_ajax_nopriv_wl_jsonld', $this->jsonld_service, 'get');
1130 1130
 
1131 1131
 		// Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service`
1132 1132
 		// in order to tweak WP's `WP_Query` to include entities in queries related
1133 1133
 		// to categories.
1134
-		$this->loader->add_action( 'pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1 );
1134
+		$this->loader->add_action('pre_get_posts', $this->category_taxonomy_service, 'pre_get_posts', 10, 1);
1135 1135
 
1136 1136
 	}
1137 1137
 
Please login to merge, or discard this patch.
src/includes/class-wordlift-tinymce-adapter.php 2 patches
Indentation   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -14,54 +14,54 @@
 block discarded – undo
14 14
  */
15 15
 class Wordlift_Tinymce_Adapter {
16 16
 
17
-	/**
18
-	 * The {@link Wordlift} plugin instance.
19
-	 *
20
-	 * @since  3.12.0
21
-	 * @access private
22
-	 * @var \Wordlift $plugin The {@link Wordlift} plugin instance.
23
-	 */
24
-	private $plugin;
17
+    /**
18
+     * The {@link Wordlift} plugin instance.
19
+     *
20
+     * @since  3.12.0
21
+     * @access private
22
+     * @var \Wordlift $plugin The {@link Wordlift} plugin instance.
23
+     */
24
+    private $plugin;
25 25
 
26
-	/**
27
-	 * Wordlift_Tinymce_Adapter constructor.
28
-	 *
29
-	 * @param \Wordlift $plugin The {@link Wordlift} plugin instance.
30
-	 */
31
-	public function __construct( $plugin ) {
26
+    /**
27
+     * Wordlift_Tinymce_Adapter constructor.
28
+     *
29
+     * @param \Wordlift $plugin The {@link Wordlift} plugin instance.
30
+     */
31
+    public function __construct( $plugin ) {
32 32
 
33
-		$this->plugin = $plugin;
33
+        $this->plugin = $plugin;
34 34
 
35
-	}
35
+    }
36 36
 
37
-	/**
38
-	 * Load the TinyMCE plugin. This method is called by the WP mce_external_plugins hook.
39
-	 *
40
-	 * @since 3.12.0
41
-	 *
42
-	 * @param array $plugins The existing plugins array.
43
-	 *
44
-	 * @return array The modified plugins array.
45
-	 */
46
-	function mce_external_plugins( $plugins ) {
37
+    /**
38
+     * Load the TinyMCE plugin. This method is called by the WP mce_external_plugins hook.
39
+     *
40
+     * @since 3.12.0
41
+     *
42
+     * @param array $plugins The existing plugins array.
43
+     *
44
+     * @return array The modified plugins array.
45
+     */
46
+    function mce_external_plugins( $plugins ) {
47 47
 
48
-		// Get WordLift's version as a cache killer.
49
-		$version = $this->plugin->get_version();
48
+        // Get WordLift's version as a cache killer.
49
+        $version = $this->plugin->get_version();
50 50
 
51
-		// User can edit?
52
-		$can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
51
+        // User can edit?
52
+        $can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
53 53
 
54
-		// If user can't edit or rich editing isn't enabled, bail out.
55
-		if ( ! $can_edit || ! get_user_option( 'rich_editing' ) ) {
56
-			return $plugins;
57
-		}
54
+        // If user can't edit or rich editing isn't enabled, bail out.
55
+        if ( ! $can_edit || ! get_user_option( 'rich_editing' ) ) {
56
+            return $plugins;
57
+        }
58 58
 
59
-		// Add our own JavaScript file to TinyMCE's extensions.
60
-		$plugins['wordlift']      = plugin_dir_url( dirname( __FILE__ ) ) . 'js/wordlift-reloaded.js?ver=' . $version;
61
-		$plugins['wl_shortcodes'] = plugin_dir_url( dirname( __FILE__ ) ) . 'admin/js/wordlift_shortcode_tinymce_plugin.js?ver=' . $version;
62
-		$plugins['wl_tinymce']    = plugin_dir_url( dirname( __FILE__ ) ) . 'admin/js/wordlift-admin-tinymce.bundle.js?ver=' . $version;
59
+        // Add our own JavaScript file to TinyMCE's extensions.
60
+        $plugins['wordlift']      = plugin_dir_url( dirname( __FILE__ ) ) . 'js/wordlift-reloaded.js?ver=' . $version;
61
+        $plugins['wl_shortcodes'] = plugin_dir_url( dirname( __FILE__ ) ) . 'admin/js/wordlift_shortcode_tinymce_plugin.js?ver=' . $version;
62
+        $plugins['wl_tinymce']    = plugin_dir_url( dirname( __FILE__ ) ) . 'admin/js/wordlift-admin-tinymce.bundle.js?ver=' . $version;
63 63
 
64
-		return $plugins;
65
-	}
64
+        return $plugins;
65
+    }
66 66
 
67 67
 }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	 *
29 29
 	 * @param \Wordlift $plugin The {@link Wordlift} plugin instance.
30 30
 	 */
31
-	public function __construct( $plugin ) {
31
+	public function __construct($plugin) {
32 32
 
33 33
 		$this->plugin = $plugin;
34 34
 
@@ -43,23 +43,23 @@  discard block
 block discarded – undo
43 43
 	 *
44 44
 	 * @return array The modified plugins array.
45 45
 	 */
46
-	function mce_external_plugins( $plugins ) {
46
+	function mce_external_plugins($plugins) {
47 47
 
48 48
 		// Get WordLift's version as a cache killer.
49 49
 		$version = $this->plugin->get_version();
50 50
 
51 51
 		// User can edit?
52
-		$can_edit = current_user_can( 'edit_posts' ) || current_user_can( 'edit_pages' );
52
+		$can_edit = current_user_can('edit_posts') || current_user_can('edit_pages');
53 53
 
54 54
 		// If user can't edit or rich editing isn't enabled, bail out.
55
-		if ( ! $can_edit || ! get_user_option( 'rich_editing' ) ) {
55
+		if ( ! $can_edit || ! get_user_option('rich_editing')) {
56 56
 			return $plugins;
57 57
 		}
58 58
 
59 59
 		// Add our own JavaScript file to TinyMCE's extensions.
60
-		$plugins['wordlift']      = plugin_dir_url( dirname( __FILE__ ) ) . 'js/wordlift-reloaded.js?ver=' . $version;
61
-		$plugins['wl_shortcodes'] = plugin_dir_url( dirname( __FILE__ ) ) . 'admin/js/wordlift_shortcode_tinymce_plugin.js?ver=' . $version;
62
-		$plugins['wl_tinymce']    = plugin_dir_url( dirname( __FILE__ ) ) . 'admin/js/wordlift-admin-tinymce.bundle.js?ver=' . $version;
60
+		$plugins['wordlift']      = plugin_dir_url(dirname(__FILE__)).'js/wordlift-reloaded.js?ver='.$version;
61
+		$plugins['wl_shortcodes'] = plugin_dir_url(dirname(__FILE__)).'admin/js/wordlift_shortcode_tinymce_plugin.js?ver='.$version;
62
+		$plugins['wl_tinymce']    = plugin_dir_url(dirname(__FILE__)).'admin/js/wordlift-admin-tinymce.bundle.js?ver='.$version;
63 63
 
64 64
 		return $plugins;
65 65
 	}
Please login to merge, or discard this patch.