@@ -15,11 +15,11 @@ |
||
15 | 15 | protected static $version = '3.40.2'; |
16 | 16 | |
17 | 17 | public function install() { |
18 | - if ( ! wp_next_scheduled( 'wl_daily_cron' ) ) { |
|
19 | - wp_schedule_event( time(), 'daily', 'wl_daily_cron' ); |
|
18 | + if ( ! wp_next_scheduled('wl_daily_cron')) { |
|
19 | + wp_schedule_event(time(), 'daily', 'wl_daily_cron'); |
|
20 | 20 | } |
21 | 21 | |
22 | - do_action( 'update_option_wl_exclude_include_urls_settings' ); |
|
22 | + do_action('update_option_wl_exclude_include_urls_settings'); |
|
23 | 23 | |
24 | 24 | Ttl_Cache::flush_all(); |
25 | 25 | } |
@@ -11,26 +11,26 @@ |
||
11 | 11 | class Term_Jsonld { |
12 | 12 | |
13 | 13 | public function init() { |
14 | - add_filter( 'wl_term_jsonld_array', array( $this, 'wl_term_jsonld_array' ), 10, 2 ); |
|
14 | + add_filter('wl_term_jsonld_array', array($this, 'wl_term_jsonld_array'), 10, 2); |
|
15 | 15 | } |
16 | 16 | |
17 | - public function wl_term_jsonld_array( $jsonld_array, $term_id ) { |
|
17 | + public function wl_term_jsonld_array($jsonld_array, $term_id) { |
|
18 | 18 | |
19 | - $entities = Jsonld_Utils::get_matched_entities_for_term( $term_id ); |
|
19 | + $entities = Jsonld_Utils::get_matched_entities_for_term($term_id); |
|
20 | 20 | |
21 | - if ( count( $entities ) > 0 ) { |
|
22 | - $entity = array_shift( $entities ); |
|
21 | + if (count($entities) > 0) { |
|
22 | + $entity = array_shift($entities); |
|
23 | 23 | $entity['@context'] = 'http://schema.org'; |
24 | 24 | |
25 | - $term_link = get_term_link( $term_id ); |
|
26 | - if ( is_wp_error( $term_link ) ) { |
|
27 | - Wordlift_Log_Service::get_logger( get_class() ) |
|
28 | - ->error( "Term $term_id returned an error: " . $term_link->get_error_message() ); |
|
25 | + $term_link = get_term_link($term_id); |
|
26 | + if (is_wp_error($term_link)) { |
|
27 | + Wordlift_Log_Service::get_logger(get_class()) |
|
28 | + ->error("Term $term_id returned an error: ".$term_link->get_error_message()); |
|
29 | 29 | |
30 | 30 | return $jsonld_array; |
31 | 31 | } |
32 | 32 | |
33 | - $entity['@id'] = $term_link . '/#id'; |
|
33 | + $entity['@id'] = $term_link.'/#id'; |
|
34 | 34 | $entity['url'] = $term_link; |
35 | 35 | $entity['mainEntityOfPage'] = $term_link; |
36 | 36 | $jsonld_array['jsonld'][] = $entity; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | use Wordlift\Api\Default_Api_Service; |
14 | 14 | |
15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
15 | +if ( ! defined('ABSPATH')) { |
|
16 | 16 | exit; |
17 | 17 | } |
18 | 18 | |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | */ |
151 | 151 | protected function __construct() { |
152 | 152 | |
153 | - $this->log = Wordlift_Log_Service::get_logger( get_class() ); |
|
153 | + $this->log = Wordlift_Log_Service::get_logger(get_class()); |
|
154 | 154 | |
155 | 155 | // Sync some configuration properties when key is validated. |
156 | - add_action( 'wl_key_validation_response', array( $this, 'sync' ) ); |
|
156 | + add_action('wl_key_validation_response', array($this, 'sync')); |
|
157 | 157 | |
158 | 158 | } |
159 | 159 | |
@@ -162,15 +162,15 @@ discard block |
||
162 | 162 | * |
163 | 163 | * @return void |
164 | 164 | */ |
165 | - public function sync( $response ) { |
|
166 | - if ( ! $response->is_success() ) { |
|
165 | + public function sync($response) { |
|
166 | + if ( ! $response->is_success()) { |
|
167 | 167 | return; |
168 | 168 | } |
169 | - $data = json_decode( $response->get_body(), true ); |
|
170 | - if ( ! is_array( $data ) || ! array_key_exists( 'networkDatasetId', $data ) ) { |
|
169 | + $data = json_decode($response->get_body(), true); |
|
170 | + if ( ! is_array($data) || ! array_key_exists('networkDatasetId', $data)) { |
|
171 | 171 | return; |
172 | 172 | } |
173 | - $this->set_network_dataset_ids( $data['networkDatasetId'] ); |
|
173 | + $this->set_network_dataset_ids($data['networkDatasetId']); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | /** |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | public static function get_instance() { |
193 | 193 | |
194 | - if ( ! isset( self::$instance ) ) { |
|
194 | + if ( ! isset(self::$instance)) { |
|
195 | 195 | self::$instance = new self(); |
196 | 196 | } |
197 | 197 | |
@@ -209,11 +209,11 @@ discard block |
||
209 | 209 | * @return mixed The configuration value or the default value if not found. |
210 | 210 | * @since 3.6.0 |
211 | 211 | */ |
212 | - private function get( $option, $key, $default = '' ) { |
|
212 | + private function get($option, $key, $default = '') { |
|
213 | 213 | |
214 | - $options = get_option( $option, array() ); |
|
214 | + $options = get_option($option, array()); |
|
215 | 215 | |
216 | - return isset( $options[ $key ] ) ? $options[ $key ] : $default; |
|
216 | + return isset($options[$key]) ? $options[$key] : $default; |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -225,12 +225,12 @@ discard block |
||
225 | 225 | * |
226 | 226 | * @since 3.9.0 |
227 | 227 | */ |
228 | - private function set( $option, $key, $value ) { |
|
228 | + private function set($option, $key, $value) { |
|
229 | 229 | |
230 | - $values = get_option( $option ); |
|
231 | - $values = isset( $values ) ? $values : array(); |
|
232 | - $values[ $key ] = $value; |
|
233 | - update_option( $option, $values ); |
|
230 | + $values = get_option($option); |
|
231 | + $values = isset($values) ? $values : array(); |
|
232 | + $values[$key] = $value; |
|
233 | + update_option($option, $values); |
|
234 | 234 | |
235 | 235 | } |
236 | 236 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function get_entity_base_path() { |
244 | 244 | |
245 | - return $this->get( 'wl_general_settings', self::ENTITY_BASE_PATH_KEY, 'entity' ); |
|
245 | + return $this->get('wl_general_settings', self::ENTITY_BASE_PATH_KEY, 'entity'); |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | /** |
@@ -252,9 +252,9 @@ discard block |
||
252 | 252 | * |
253 | 253 | * @since 3.9.0 |
254 | 254 | */ |
255 | - public function set_entity_base_path( $value ) { |
|
255 | + public function set_entity_base_path($value) { |
|
256 | 256 | |
257 | - $this->set( 'wl_general_settings', self::ENTITY_BASE_PATH_KEY, $value ); |
|
257 | + $this->set('wl_general_settings', self::ENTITY_BASE_PATH_KEY, $value); |
|
258 | 258 | |
259 | 259 | } |
260 | 260 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function is_skip_wizard() { |
268 | 268 | |
269 | - return $this->get( 'wl_general_settings', self::SKIP_WIZARD, false ); |
|
269 | + return $this->get('wl_general_settings', self::SKIP_WIZARD, false); |
|
270 | 270 | } |
271 | 271 | |
272 | 272 | /** |
@@ -276,9 +276,9 @@ discard block |
||
276 | 276 | * |
277 | 277 | * @since 3.9.0 |
278 | 278 | */ |
279 | - public function set_skip_wizard( $value ) { |
|
279 | + public function set_skip_wizard($value) { |
|
280 | 280 | |
281 | - $this->set( 'wl_general_settings', self::SKIP_WIZARD, true === $value ); |
|
281 | + $this->set('wl_general_settings', self::SKIP_WIZARD, true === $value); |
|
282 | 282 | |
283 | 283 | } |
284 | 284 | |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | */ |
291 | 291 | public function get_key() { |
292 | 292 | |
293 | - return $this->get( 'wl_general_settings', self::KEY, '' ); |
|
293 | + return $this->get('wl_general_settings', self::KEY, ''); |
|
294 | 294 | } |
295 | 295 | |
296 | 296 | /** |
@@ -300,9 +300,9 @@ discard block |
||
300 | 300 | * |
301 | 301 | * @since 3.9.0 |
302 | 302 | */ |
303 | - public function set_key( $value ) { |
|
303 | + public function set_key($value) { |
|
304 | 304 | |
305 | - $this->set( 'wl_general_settings', self::KEY, $value ); |
|
305 | + $this->set('wl_general_settings', self::KEY, $value); |
|
306 | 306 | } |
307 | 307 | |
308 | 308 | /** |
@@ -316,11 +316,11 @@ discard block |
||
316 | 316 | public function get_language_code() { |
317 | 317 | |
318 | 318 | $language = get_locale(); |
319 | - if ( ! $language ) { |
|
319 | + if ( ! $language) { |
|
320 | 320 | return 'en'; |
321 | 321 | } |
322 | 322 | |
323 | - return substr( $language, 0, 2 ); |
|
323 | + return substr($language, 0, 2); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | /** |
@@ -335,9 +335,9 @@ discard block |
||
335 | 335 | * |
336 | 336 | * @since 3.9.0 |
337 | 337 | */ |
338 | - public function set_language_code( $value ) { |
|
338 | + public function set_language_code($value) { |
|
339 | 339 | |
340 | - $this->set( 'wl_general_settings', self::LANGUAGE, $value ); |
|
340 | + $this->set('wl_general_settings', self::LANGUAGE, $value); |
|
341 | 341 | |
342 | 342 | } |
343 | 343 | |
@@ -348,9 +348,9 @@ discard block |
||
348 | 348 | * |
349 | 349 | * @since 3.19.0 |
350 | 350 | */ |
351 | - public function set_diagnostic_preferences( $value ) { |
|
351 | + public function set_diagnostic_preferences($value) { |
|
352 | 352 | |
353 | - $this->set( 'wl_general_settings', self::SEND_DIAGNOSTIC, $value ); |
|
353 | + $this->set('wl_general_settings', self::SEND_DIAGNOSTIC, $value); |
|
354 | 354 | |
355 | 355 | } |
356 | 356 | |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | */ |
362 | 362 | public function get_diagnostic_preferences() { |
363 | 363 | |
364 | - return $this->get( 'wl_general_settings', self::SEND_DIAGNOSTIC, 'no' ); |
|
364 | + return $this->get('wl_general_settings', self::SEND_DIAGNOSTIC, 'no'); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | /** |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | */ |
373 | 373 | public function get_country_code() { |
374 | 374 | |
375 | - return $this->get( 'wl_general_settings', self::COUNTRY_CODE, 'us' ); |
|
375 | + return $this->get('wl_general_settings', self::COUNTRY_CODE, 'us'); |
|
376 | 376 | } |
377 | 377 | |
378 | 378 | /** |
@@ -382,9 +382,9 @@ discard block |
||
382 | 382 | * |
383 | 383 | * @since 3.18.0 |
384 | 384 | */ |
385 | - public function set_country_code( $value ) { |
|
385 | + public function set_country_code($value) { |
|
386 | 386 | |
387 | - $this->set( 'wl_general_settings', self::COUNTRY_CODE, $value ); |
|
387 | + $this->set('wl_general_settings', self::COUNTRY_CODE, $value); |
|
388 | 388 | |
389 | 389 | } |
390 | 390 | |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | * @since 3.38.6 |
398 | 398 | */ |
399 | 399 | public function get_alternate_name() { |
400 | - return $this->get( 'wl_general_settings', self::ALTERNATE_NAME ); |
|
400 | + return $this->get('wl_general_settings', self::ALTERNATE_NAME); |
|
401 | 401 | } |
402 | 402 | |
403 | 403 | /** |
@@ -407,9 +407,9 @@ discard block |
||
407 | 407 | * |
408 | 408 | * @since 3.38.6 |
409 | 409 | */ |
410 | - public function set_alternate_name( $value ) { |
|
410 | + public function set_alternate_name($value) { |
|
411 | 411 | |
412 | - $this->set( 'wl_general_settings', self::ALTERNATE_NAME, wp_strip_all_tags( $value ) ); |
|
412 | + $this->set('wl_general_settings', self::ALTERNATE_NAME, wp_strip_all_tags($value)); |
|
413 | 413 | |
414 | 414 | } |
415 | 415 | |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | */ |
425 | 425 | public function get_publisher_id() { |
426 | 426 | |
427 | - return $this->get( 'wl_general_settings', self::PUBLISHER_ID, null ); |
|
427 | + return $this->get('wl_general_settings', self::PUBLISHER_ID, null); |
|
428 | 428 | } |
429 | 429 | |
430 | 430 | /** |
@@ -434,9 +434,9 @@ discard block |
||
434 | 434 | * |
435 | 435 | * @since 3.9.0 |
436 | 436 | */ |
437 | - public function set_publisher_id( $value ) { |
|
437 | + public function set_publisher_id($value) { |
|
438 | 438 | |
439 | - $this->set( 'wl_general_settings', self::PUBLISHER_ID, $value ); |
|
439 | + $this->set('wl_general_settings', self::PUBLISHER_ID, $value); |
|
440 | 440 | |
441 | 441 | } |
442 | 442 | |
@@ -449,8 +449,8 @@ discard block |
||
449 | 449 | */ |
450 | 450 | public function get_dataset_uri() { |
451 | 451 | |
452 | - if ( apply_filters( 'wl_feature__enable__dataset', true ) ) { |
|
453 | - return $this->get( 'wl_advanced_settings', self::DATASET_URI, null ); |
|
452 | + if (apply_filters('wl_feature__enable__dataset', true)) { |
|
453 | + return $this->get('wl_advanced_settings', self::DATASET_URI, null); |
|
454 | 454 | } else { |
455 | 455 | return null; |
456 | 456 | } |
@@ -463,9 +463,9 @@ discard block |
||
463 | 463 | * |
464 | 464 | * @since 3.10.0 |
465 | 465 | */ |
466 | - public function set_dataset_uri( $value ) { |
|
466 | + public function set_dataset_uri($value) { |
|
467 | 467 | |
468 | - $this->set( 'wl_advanced_settings', self::DATASET_URI, $value ); |
|
468 | + $this->set('wl_advanced_settings', self::DATASET_URI, $value); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | /** |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | */ |
477 | 477 | public function get_package_type() { |
478 | 478 | |
479 | - return $this->get( 'wl_advanced_settings', self::PACKAGE_TYPE, null ); |
|
479 | + return $this->get('wl_advanced_settings', self::PACKAGE_TYPE, null); |
|
480 | 480 | } |
481 | 481 | |
482 | 482 | /** |
@@ -486,8 +486,8 @@ discard block |
||
486 | 486 | * |
487 | 487 | * @since 3.20.0 |
488 | 488 | */ |
489 | - public function set_package_type( $value ) { |
|
490 | - $this->set( 'wl_advanced_settings', self::PACKAGE_TYPE, $value ); |
|
489 | + public function set_package_type($value) { |
|
490 | + $this->set('wl_advanced_settings', self::PACKAGE_TYPE, $value); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | /** |
@@ -502,11 +502,11 @@ discard block |
||
502 | 502 | * @param array $old_value The old settings. |
503 | 503 | * @param array $new_value The new settings. |
504 | 504 | */ |
505 | - public function update_key( $old_value, $new_value ) { |
|
505 | + public function update_key($old_value, $new_value) { |
|
506 | 506 | |
507 | 507 | // Check the old key value and the new one. We're going to ask for the dataset URI only if the key has changed. |
508 | 508 | // $old_key = isset( $old_value['key'] ) ? $old_value['key'] : ''; |
509 | - $new_key = isset( $new_value['key'] ) ? $new_value['key'] : ''; |
|
509 | + $new_key = isset($new_value['key']) ? $new_value['key'] : ''; |
|
510 | 510 | |
511 | 511 | // If the key hasn't changed, don't do anything. |
512 | 512 | // WARN The 'update_option' hook is fired only if the new and old value are not equal. |
@@ -515,14 +515,14 @@ discard block |
||
515 | 515 | // } |
516 | 516 | |
517 | 517 | // If the key is empty, empty the dataset URI. |
518 | - if ( '' === $new_key ) { |
|
519 | - $this->set_dataset_uri( '' ); |
|
518 | + if ('' === $new_key) { |
|
519 | + $this->set_dataset_uri(''); |
|
520 | 520 | } |
521 | 521 | |
522 | 522 | // make the request to the remote server. |
523 | - $this->get_remote_dataset_uri( $new_key ); |
|
523 | + $this->get_remote_dataset_uri($new_key); |
|
524 | 524 | |
525 | - do_action( 'wl_key_updated' ); |
|
525 | + do_action('wl_key_updated'); |
|
526 | 526 | |
527 | 527 | } |
528 | 528 | |
@@ -538,15 +538,15 @@ discard block |
||
538 | 538 | * |
539 | 539 | * @since 3.17.0 send the site URL and get the dataset URI. |
540 | 540 | */ |
541 | - public function get_remote_dataset_uri( $key ) { |
|
541 | + public function get_remote_dataset_uri($key) { |
|
542 | 542 | |
543 | - $this->log->trace( 'Getting the remote dataset URI and package type...' ); |
|
543 | + $this->log->trace('Getting the remote dataset URI and package type...'); |
|
544 | 544 | |
545 | - if ( empty( $key ) ) { |
|
546 | - $this->log->warn( 'Key set to empty value.' ); |
|
545 | + if (empty($key)) { |
|
546 | + $this->log->warn('Key set to empty value.'); |
|
547 | 547 | |
548 | - $this->set_dataset_uri( '' ); |
|
549 | - $this->set_package_type( null ); |
|
548 | + $this->set_dataset_uri(''); |
|
549 | + $this->set_package_type(null); |
|
550 | 550 | |
551 | 551 | return; |
552 | 552 | } |
@@ -560,15 +560,15 @@ discard block |
||
560 | 560 | * |
561 | 561 | * @since 3.20.0 |
562 | 562 | */ |
563 | - $home_url = get_option( 'home' ); |
|
564 | - $site_url = apply_filters( 'wl_production_site_url', untrailingslashit( $home_url ) ); |
|
563 | + $home_url = get_option('home'); |
|
564 | + $site_url = apply_filters('wl_production_site_url', untrailingslashit($home_url)); |
|
565 | 565 | |
566 | 566 | // Build the URL. |
567 | 567 | $url = '/accounts' |
568 | - . '?key=' . rawurlencode( $key ) |
|
569 | - . '&url=' . rawurlencode( $site_url ) |
|
570 | - . '&country=' . $this->get_country_code() |
|
571 | - . '&language=' . $this->get_language_code(); |
|
568 | + . '?key='.rawurlencode($key) |
|
569 | + . '&url='.rawurlencode($site_url) |
|
570 | + . '&country='.$this->get_country_code() |
|
571 | + . '&language='.$this->get_language_code(); |
|
572 | 572 | |
573 | 573 | $api_service = Default_Api_Service::get_instance(); |
574 | 574 | /** |
@@ -578,32 +578,32 @@ discard block |
||
578 | 578 | $headers = array( |
579 | 579 | 'Authorization' => "Key $key", |
580 | 580 | ); |
581 | - $response = $api_service->request( 'PUT', $url, $headers )->get_response(); |
|
581 | + $response = $api_service->request('PUT', $url, $headers)->get_response(); |
|
582 | 582 | |
583 | 583 | // The response is an error. |
584 | - if ( is_wp_error( $response ) ) { |
|
585 | - $this->log->error( 'An error occurred setting the dataset URI: ' . $response->get_error_message() ); |
|
584 | + if (is_wp_error($response)) { |
|
585 | + $this->log->error('An error occurred setting the dataset URI: '.$response->get_error_message()); |
|
586 | 586 | |
587 | - $this->set_dataset_uri( '' ); |
|
588 | - $this->set_package_type( null ); |
|
587 | + $this->set_dataset_uri(''); |
|
588 | + $this->set_package_type(null); |
|
589 | 589 | |
590 | 590 | return; |
591 | 591 | } |
592 | 592 | |
593 | 593 | // The response is not OK. |
594 | - if ( ! is_array( $response ) || 200 !== (int) $response['response']['code'] ) { |
|
594 | + if ( ! is_array($response) || 200 !== (int) $response['response']['code']) { |
|
595 | 595 | $base_url = $api_service->get_base_url(); |
596 | 596 | |
597 | - if ( ! is_array( $response ) ) { |
|
597 | + if ( ! is_array($response)) { |
|
598 | 598 | // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export |
599 | - $this->log->error( "Unexpected response when opening URL $base_url$url: " . var_export( $response, true ) ); |
|
599 | + $this->log->error("Unexpected response when opening URL $base_url$url: ".var_export($response, true)); |
|
600 | 600 | } else { |
601 | 601 | // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export |
602 | - $this->log->error( "Unexpected status code when opening URL $base_url$url: " . $response['response']['code'] . "\n" . var_export( $response, true ) ); |
|
602 | + $this->log->error("Unexpected status code when opening URL $base_url$url: ".$response['response']['code']."\n".var_export($response, true)); |
|
603 | 603 | } |
604 | 604 | |
605 | - $this->set_dataset_uri( '' ); |
|
606 | - $this->set_package_type( null ); |
|
605 | + $this->set_dataset_uri(''); |
|
606 | + $this->set_package_type(null); |
|
607 | 607 | |
608 | 608 | return; |
609 | 609 | } |
@@ -613,20 +613,20 @@ discard block |
||
613 | 613 | * |
614 | 614 | * @since 3.20.0 |
615 | 615 | */ |
616 | - $json = json_decode( $response['body'] ); |
|
616 | + $json = json_decode($response['body']); |
|
617 | 617 | /** |
618 | 618 | * @since 3.27.7 |
619 | 619 | * Remove the trailing slash returned from the new platform api. |
620 | 620 | */ |
621 | 621 | // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase |
622 | - $dataset_uri = untrailingslashit( $json->datasetURI ); |
|
622 | + $dataset_uri = untrailingslashit($json->datasetURI); |
|
623 | 623 | // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase |
624 | - $package_type = isset( $json->packageType ) ? $json->packageType : null; |
|
624 | + $package_type = isset($json->packageType) ? $json->packageType : null; |
|
625 | 625 | |
626 | - $this->log->info( "Updating [ dataset uri :: $dataset_uri ][ package type :: $package_type ]..." ); |
|
626 | + $this->log->info("Updating [ dataset uri :: $dataset_uri ][ package type :: $package_type ]..."); |
|
627 | 627 | |
628 | - $this->set_dataset_uri( $dataset_uri ); |
|
629 | - $this->set_package_type( $package_type ); |
|
628 | + $this->set_dataset_uri($dataset_uri); |
|
629 | + $this->set_package_type($package_type); |
|
630 | 630 | } |
631 | 631 | |
632 | 632 | /** |
@@ -643,20 +643,20 @@ discard block |
||
643 | 643 | * @return mixed The same value in the $value parameter |
644 | 644 | * @since 3.12.0 |
645 | 645 | */ |
646 | - public function maybe_update_dataset_uri( $value, $old_value ) { |
|
646 | + public function maybe_update_dataset_uri($value, $old_value) { |
|
647 | 647 | |
648 | 648 | // Check the old key value and the new one. Here we're only handling the |
649 | 649 | // case where the key hasn't changed and the dataset URI isn't set. The |
650 | 650 | // other case, i.e. a new key is inserted, is handled at `update_key`. |
651 | - $old_key = isset( $old_value['key'] ) ? $old_value['key'] : ''; |
|
652 | - $new_key = isset( $value['key'] ) ? $value['key'] : ''; |
|
651 | + $old_key = isset($old_value['key']) ? $old_value['key'] : ''; |
|
652 | + $new_key = isset($value['key']) ? $value['key'] : ''; |
|
653 | 653 | |
654 | 654 | $dataset_uri = $this->get_dataset_uri(); |
655 | 655 | |
656 | - if ( ! empty( $new_key ) && $new_key === $old_key && empty( $dataset_uri ) ) { |
|
656 | + if ( ! empty($new_key) && $new_key === $old_key && empty($dataset_uri)) { |
|
657 | 657 | |
658 | 658 | // make the request to the remote server to try to get the dataset uri. |
659 | - $this->get_remote_dataset_uri( $new_key ); |
|
659 | + $this->get_remote_dataset_uri($new_key); |
|
660 | 660 | } |
661 | 661 | |
662 | 662 | return $value; |
@@ -670,9 +670,9 @@ discard block |
||
670 | 670 | * @return string The API URI. |
671 | 671 | * @since 3.11.0 |
672 | 672 | */ |
673 | - public function get_accounts_by_key_dataset_uri( $key ) { |
|
673 | + public function get_accounts_by_key_dataset_uri($key) { |
|
674 | 674 | |
675 | - return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE . "accounts/key=$key/dataset_uri"; |
|
675 | + return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE."accounts/key=$key/dataset_uri"; |
|
676 | 676 | } |
677 | 677 | |
678 | 678 | /** |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | */ |
684 | 684 | public function get_accounts() { |
685 | 685 | |
686 | - return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE . 'accounts'; |
|
686 | + return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE.'accounts'; |
|
687 | 687 | } |
688 | 688 | |
689 | 689 | /** |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | */ |
695 | 695 | public function is_link_by_default() { |
696 | 696 | |
697 | - return 'yes' === $this->get( 'wl_general_settings', self::LINK_BY_DEFAULT, 'yes' ); |
|
697 | + return 'yes' === $this->get('wl_general_settings', self::LINK_BY_DEFAULT, 'yes'); |
|
698 | 698 | } |
699 | 699 | |
700 | 700 | /** |
@@ -704,9 +704,9 @@ discard block |
||
704 | 704 | * |
705 | 705 | * @since 3.13.0 |
706 | 706 | */ |
707 | - public function set_link_by_default( $value ) { |
|
707 | + public function set_link_by_default($value) { |
|
708 | 708 | |
709 | - $this->set( 'wl_general_settings', self::LINK_BY_DEFAULT, true === $value ? 'yes' : 'no' ); |
|
709 | + $this->set('wl_general_settings', self::LINK_BY_DEFAULT, true === $value ? 'yes' : 'no'); |
|
710 | 710 | } |
711 | 711 | |
712 | 712 | /** |
@@ -716,7 +716,7 @@ discard block |
||
716 | 716 | * @since 3.21.0 |
717 | 717 | */ |
718 | 718 | public function is_analytics_enable() { |
719 | - return 'yes' === $this->get( 'wl_analytics_settings', self::ANALYTICS_ENABLE, 'no' ); |
|
719 | + return 'yes' === $this->get('wl_analytics_settings', self::ANALYTICS_ENABLE, 'no'); |
|
720 | 720 | } |
721 | 721 | |
722 | 722 | /** |
@@ -726,9 +726,9 @@ discard block |
||
726 | 726 | * |
727 | 727 | * @since 3.21.0 |
728 | 728 | */ |
729 | - public function set_is_analytics_enable( $value ) { |
|
729 | + public function set_is_analytics_enable($value) { |
|
730 | 730 | |
731 | - $this->set( 'wl_general_settings', self::ANALYTICS_ENABLE, true === $value ? 'yes' : 'no' ); |
|
731 | + $this->set('wl_general_settings', self::ANALYTICS_ENABLE, true === $value ? 'yes' : 'no'); |
|
732 | 732 | } |
733 | 733 | |
734 | 734 | /** |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | * @since 3.21.0 |
739 | 739 | */ |
740 | 740 | public function get_analytics_entity_uri_dimension() { |
741 | - return (int) $this->get( 'wl_analytics_settings', self::ANALYTICS_ENTITY_URI_DIMENSION, 1 ); |
|
741 | + return (int) $this->get('wl_analytics_settings', self::ANALYTICS_ENTITY_URI_DIMENSION, 1); |
|
742 | 742 | } |
743 | 743 | |
744 | 744 | /** |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | * @since 3.21.0 |
749 | 749 | */ |
750 | 750 | public function get_analytics_entity_type_dimension() { |
751 | - return $this->get( 'wl_analytics_settings', self::ANALYTICS_ENTITY_TYPE_DIMENSION, 2 ); |
|
751 | + return $this->get('wl_analytics_settings', self::ANALYTICS_ENTITY_TYPE_DIMENSION, 2); |
|
752 | 752 | } |
753 | 753 | |
754 | 754 | /** |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | */ |
760 | 760 | public function get_autocomplete_url() { |
761 | 761 | |
762 | - return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE . 'autocomplete'; |
|
762 | + return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE.'autocomplete'; |
|
763 | 763 | |
764 | 764 | } |
765 | 765 | |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | */ |
772 | 772 | public function get_deactivation_feedback_url() { |
773 | 773 | |
774 | - return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE . 'feedbacks'; |
|
774 | + return WL_CONFIG_WORDLIFT_API_URL_DEFAULT_VALUE.'feedbacks'; |
|
775 | 775 | |
776 | 776 | } |
777 | 777 | |
@@ -787,24 +787,24 @@ discard block |
||
787 | 787 | } |
788 | 788 | |
789 | 789 | public function get_network_dataset_ids() { |
790 | - return $this->get( 'wl_advanced_settings', self::NETWORK_DATASET_IDS, array() ); |
|
790 | + return $this->get('wl_advanced_settings', self::NETWORK_DATASET_IDS, array()); |
|
791 | 791 | } |
792 | 792 | |
793 | - public function set_network_dataset_ids( $network_dataset_ids ) { |
|
794 | - $this->set( 'wl_advanced_settings', self::NETWORK_DATASET_IDS, $network_dataset_ids ); |
|
793 | + public function set_network_dataset_ids($network_dataset_ids) { |
|
794 | + $this->set('wl_advanced_settings', self::NETWORK_DATASET_IDS, $network_dataset_ids); |
|
795 | 795 | } |
796 | 796 | |
797 | 797 | |
798 | 798 | |
799 | 799 | public function get_skip_installation_notice() { |
800 | 800 | |
801 | - return $this->get( 'wl_general_settings', self::SKIP_INSTALLATION_NOTICE, false ); |
|
801 | + return $this->get('wl_general_settings', self::SKIP_INSTALLATION_NOTICE, false); |
|
802 | 802 | } |
803 | 803 | |
804 | 804 | |
805 | - public function set_skip_installation_notice( $value ) { |
|
805 | + public function set_skip_installation_notice($value) { |
|
806 | 806 | |
807 | - $this->set( 'wl_general_settings', self::SKIP_INSTALLATION_NOTICE, $value ); |
|
807 | + $this->set('wl_general_settings', self::SKIP_INSTALLATION_NOTICE, $value); |
|
808 | 808 | |
809 | 809 | } |
810 | 810 |
@@ -639,15 +639,15 @@ discard block |
||
639 | 639 | $that = $this; |
640 | 640 | add_action( |
641 | 641 | 'plugins_loaded', |
642 | - function () use ( $that ) { |
|
643 | - $that->define_admin_hooks( $that ); |
|
644 | - $that->define_public_hooks( $that ); |
|
642 | + function() use ($that) { |
|
643 | + $that->define_admin_hooks($that); |
|
644 | + $that->define_public_hooks($that); |
|
645 | 645 | }, |
646 | 646 | 4 |
647 | 647 | ); |
648 | 648 | |
649 | 649 | // If we're in `WP_CLI` load the related files. |
650 | - if ( class_exists( 'WP_CLI' ) ) { |
|
650 | + if (class_exists('WP_CLI')) { |
|
651 | 651 | $this->load_cli_dependencies(); |
652 | 652 | } |
653 | 653 | |
@@ -687,329 +687,329 @@ discard block |
||
687 | 687 | * The class responsible for orchestrating the actions and filters of the |
688 | 688 | * core plugin. |
689 | 689 | */ |
690 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-loader.php'; |
|
690 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-loader.php'; |
|
691 | 691 | |
692 | 692 | // The class responsible for plugin uninstall. |
693 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-deactivator-feedback.php'; |
|
693 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-deactivator-feedback.php'; |
|
694 | 694 | |
695 | 695 | /** |
696 | 696 | * The class responsible for defining internationalization functionality |
697 | 697 | * of the plugin. |
698 | 698 | */ |
699 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-i18n.php'; |
|
699 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-i18n.php'; |
|
700 | 700 | |
701 | 701 | /** |
702 | 702 | * WordLift's supported languages. |
703 | 703 | */ |
704 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-languages.php'; |
|
704 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-languages.php'; |
|
705 | 705 | |
706 | 706 | /** |
707 | 707 | * WordLift's supported countries. |
708 | 708 | */ |
709 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-countries.php'; |
|
709 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-countries.php'; |
|
710 | 710 | |
711 | 711 | /** |
712 | 712 | * Provide support functions to sanitize data. |
713 | 713 | */ |
714 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-sanitizer.php'; |
|
714 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-sanitizer.php'; |
|
715 | 715 | |
716 | 716 | /** Services. */ |
717 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-log-service.php'; |
|
718 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-http-api.php'; |
|
719 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-redirect-service.php'; |
|
720 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-configuration-service.php'; |
|
721 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-post-type-service.php'; |
|
722 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-type-service.php'; |
|
723 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-link-service.php'; |
|
724 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-relation-service.php'; |
|
725 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-image-service.php'; |
|
717 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-log-service.php'; |
|
718 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-http-api.php'; |
|
719 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-redirect-service.php'; |
|
720 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-configuration-service.php'; |
|
721 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-post-type-service.php'; |
|
722 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-type-service.php'; |
|
723 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-link-service.php'; |
|
724 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-relation-service.php'; |
|
725 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-image-service.php'; |
|
726 | 726 | |
727 | 727 | /** |
728 | 728 | * The Schema service. |
729 | 729 | */ |
730 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-schema-service.php'; |
|
730 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-schema-service.php'; |
|
731 | 731 | |
732 | 732 | /** |
733 | 733 | * The schema:url property service. |
734 | 734 | */ |
735 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-property-service.php'; |
|
736 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-schema-url-property-service.php'; |
|
735 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-property-service.php'; |
|
736 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-schema-url-property-service.php'; |
|
737 | 737 | |
738 | 738 | /** |
739 | 739 | * The UI service. |
740 | 740 | */ |
741 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-ui-service.php'; |
|
741 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-ui-service.php'; |
|
742 | 742 | |
743 | 743 | /** |
744 | 744 | * The Entity Types Taxonomy service. |
745 | 745 | */ |
746 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-type-taxonomy-service.php'; |
|
746 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-type-taxonomy-service.php'; |
|
747 | 747 | |
748 | 748 | /** |
749 | 749 | * The Entity service. |
750 | 750 | */ |
751 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-uri-service.php'; |
|
752 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-service.php'; |
|
751 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-uri-service.php'; |
|
752 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-service.php'; |
|
753 | 753 | |
754 | 754 | // Add the entity rating service. |
755 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-rating-service.php'; |
|
755 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-rating-service.php'; |
|
756 | 756 | |
757 | 757 | /** |
758 | 758 | * The User service. |
759 | 759 | */ |
760 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-user-service.php'; |
|
760 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-user-service.php'; |
|
761 | 761 | |
762 | 762 | /** |
763 | 763 | * The Timeline service. |
764 | 764 | */ |
765 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-timeline-service.php'; |
|
765 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-timeline-service.php'; |
|
766 | 766 | |
767 | 767 | /** |
768 | 768 | * The Topic Taxonomy service. |
769 | 769 | */ |
770 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-topic-taxonomy-service.php'; |
|
770 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-topic-taxonomy-service.php'; |
|
771 | 771 | |
772 | 772 | /** |
773 | 773 | * The WordLift URI service. |
774 | 774 | */ |
775 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-uri-service.php'; |
|
776 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-property-factory.php'; |
|
777 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-sample-data-service.php'; |
|
775 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-uri-service.php'; |
|
776 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-property-factory.php'; |
|
777 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-sample-data-service.php'; |
|
778 | 778 | |
779 | - require_once plugin_dir_path( __DIR__ ) . 'includes/properties/class-wordlift-property-getter-factory.php'; |
|
780 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-attachment-service.php'; |
|
779 | + require_once plugin_dir_path(__DIR__).'includes/properties/class-wordlift-property-getter-factory.php'; |
|
780 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-attachment-service.php'; |
|
781 | 781 | |
782 | 782 | /** |
783 | 783 | * Load the converters. |
784 | 784 | */ |
785 | - require_once plugin_dir_path( __DIR__ ) . 'includes/intf-wordlift-post-converter.php'; |
|
786 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-abstract-post-to-jsonld-converter.php'; |
|
787 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-postid-to-jsonld-converter.php'; |
|
788 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
789 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-post-to-jsonld-converter.php'; |
|
790 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-website-jsonld-converter.php'; |
|
785 | + require_once plugin_dir_path(__DIR__).'includes/intf-wordlift-post-converter.php'; |
|
786 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-abstract-post-to-jsonld-converter.php'; |
|
787 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-postid-to-jsonld-converter.php'; |
|
788 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-post-to-jsonld-converter.php'; |
|
789 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-post-to-jsonld-converter.php'; |
|
790 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-website-jsonld-converter.php'; |
|
791 | 791 | |
792 | 792 | /** |
793 | 793 | * Load cache-related files. |
794 | 794 | */ |
795 | - require_once plugin_dir_path( __DIR__ ) . 'includes/cache/require.php'; |
|
795 | + require_once plugin_dir_path(__DIR__).'includes/cache/require.php'; |
|
796 | 796 | |
797 | 797 | /** |
798 | 798 | * Load the content filter. |
799 | 799 | */ |
800 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-content-filter-service.php'; |
|
800 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-content-filter-service.php'; |
|
801 | 801 | |
802 | 802 | /* |
803 | 803 | * Load the excerpt helper. |
804 | 804 | */ |
805 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-post-excerpt-helper.php'; |
|
805 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-post-excerpt-helper.php'; |
|
806 | 806 | |
807 | 807 | /** |
808 | 808 | * Load the JSON-LD service to publish entities using JSON-LD.s |
809 | 809 | * |
810 | 810 | * @since 3.8.0 |
811 | 811 | */ |
812 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-jsonld-service.php'; |
|
812 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-jsonld-service.php'; |
|
813 | 813 | |
814 | 814 | // The Publisher Service and the AJAX adapter. |
815 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-publisher-service.php'; |
|
816 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-publisher-ajax-adapter.php'; |
|
815 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-publisher-service.php'; |
|
816 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-publisher-ajax-adapter.php'; |
|
817 | 817 | |
818 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-post-adapter.php'; |
|
818 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-post-adapter.php'; |
|
819 | 819 | |
820 | 820 | /** |
821 | 821 | * Load the WordLift key validation service. |
822 | 822 | */ |
823 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-key-validation-service.php'; |
|
823 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-key-validation-service.php'; |
|
824 | 824 | |
825 | 825 | // Load the `Wordlift_Category_Taxonomy_Service` class definition. |
826 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-category-taxonomy-service.php'; |
|
826 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-category-taxonomy-service.php'; |
|
827 | 827 | |
828 | 828 | // Load the `Wordlift_Entity_Page_Service` class definition. |
829 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-page-service.php'; |
|
829 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-page-service.php'; |
|
830 | 830 | |
831 | 831 | /** Linked Data. */ |
832 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-storage.php'; |
|
833 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-meta-storage.php'; |
|
834 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-property-storage.php'; |
|
835 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php'; |
|
836 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php'; |
|
837 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-author-storage.php'; |
|
838 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php'; |
|
839 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-image-storage.php'; |
|
840 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-post-related-storage.php'; |
|
841 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-url-property-storage.php'; |
|
842 | - require_once plugin_dir_path( __DIR__ ) . 'includes/linked-data/storage/class-wordlift-storage-factory.php'; |
|
832 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-storage.php'; |
|
833 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-meta-storage.php'; |
|
834 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-property-storage.php'; |
|
835 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-taxonomy-storage.php'; |
|
836 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-schema-class-storage.php'; |
|
837 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-author-storage.php'; |
|
838 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-meta-uri-storage.php'; |
|
839 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-image-storage.php'; |
|
840 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-post-related-storage.php'; |
|
841 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-url-property-storage.php'; |
|
842 | + require_once plugin_dir_path(__DIR__).'includes/linked-data/storage/class-wordlift-storage-factory.php'; |
|
843 | 843 | |
844 | 844 | /** Services. */ |
845 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-google-analytics-export-service.php'; |
|
846 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-api-service.php'; |
|
845 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-google-analytics-export-service.php'; |
|
846 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-api-service.php'; |
|
847 | 847 | |
848 | 848 | /** Adapters. */ |
849 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-tinymce-adapter.php'; |
|
850 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-newrelic-adapter.php'; |
|
851 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-sample-data-ajax-adapter.php'; |
|
852 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-entity-type-adapter.php'; |
|
853 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-wprocket-adapter.php'; |
|
854 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-nitropack-adapter.php'; |
|
849 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-tinymce-adapter.php'; |
|
850 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-newrelic-adapter.php'; |
|
851 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-sample-data-ajax-adapter.php'; |
|
852 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-entity-type-adapter.php'; |
|
853 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-wprocket-adapter.php'; |
|
854 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-nitropack-adapter.php'; |
|
855 | 855 | |
856 | 856 | /** Autocomplete. */ |
857 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-autocomplete-adapter.php'; |
|
857 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-autocomplete-adapter.php'; |
|
858 | 858 | |
859 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-remote-image-service.php'; |
|
859 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-remote-image-service.php'; |
|
860 | 860 | |
861 | 861 | /** Analytics */ |
862 | - require_once plugin_dir_path( __DIR__ ) . 'includes/analytics/class-wordlift-analytics-connect.php'; |
|
862 | + require_once plugin_dir_path(__DIR__).'includes/analytics/class-wordlift-analytics-connect.php'; |
|
863 | 863 | |
864 | 864 | /** |
865 | 865 | * The class responsible for defining all actions that occur in the admin area. |
866 | 866 | */ |
867 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin.php'; |
|
867 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin.php'; |
|
868 | 868 | |
869 | 869 | /** |
870 | 870 | * The class to customize the entity list admin page. |
871 | 871 | */ |
872 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-list-service.php'; |
|
872 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-list-service.php'; |
|
873 | 873 | |
874 | 874 | /** |
875 | 875 | * The Entity Types Taxonomy Walker (transforms checkboxes into radios). |
876 | 876 | */ |
877 | 877 | global $wp_version; |
878 | - if ( version_compare( $wp_version, '5.3', '<' ) ) { |
|
879 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
878 | + if (version_compare($wp_version, '5.3', '<')) { |
|
879 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-types-taxonomy-walker.php'; |
|
880 | 880 | } else { |
881 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php'; |
|
881 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-types-taxonomy-walker-5-3.php'; |
|
882 | 882 | } |
883 | 883 | |
884 | 884 | /** |
885 | 885 | * The Notice service. |
886 | 886 | */ |
887 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-notice-service.php'; |
|
887 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-notice-service.php'; |
|
888 | 888 | |
889 | 889 | /** |
890 | 890 | * The PrimaShop adapter. |
891 | 891 | */ |
892 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-primashop-adapter.php'; |
|
892 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-primashop-adapter.php'; |
|
893 | 893 | |
894 | 894 | /** |
895 | 895 | * The WordLift Dashboard service. |
896 | 896 | */ |
897 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-dashboard-service.php'; |
|
897 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-dashboard-service.php'; |
|
898 | 898 | |
899 | 899 | /** |
900 | 900 | * The admin 'Install wizard' page. |
901 | 901 | */ |
902 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-setup.php'; |
|
902 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-setup.php'; |
|
903 | 903 | |
904 | 904 | /** |
905 | 905 | * The WordLift entity type list admin page controller. |
906 | 906 | */ |
907 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-entity-taxonomy-list-page.php'; |
|
907 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-entity-taxonomy-list-page.php'; |
|
908 | 908 | |
909 | 909 | /** |
910 | 910 | * The WordLift entity type settings admin page controller. |
911 | 911 | */ |
912 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-entity-type-settings.php'; |
|
912 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-entity-type-settings.php'; |
|
913 | 913 | |
914 | 914 | /** |
915 | 915 | * The admin 'Download Your Data' page. |
916 | 916 | */ |
917 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-download-your-data-page.php'; |
|
917 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-download-your-data-page.php'; |
|
918 | 918 | |
919 | 919 | /** |
920 | 920 | * The admin 'WordLift Settings' page. |
921 | 921 | */ |
922 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/intf-wordlift-admin-element.php'; |
|
923 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-input-element.php'; |
|
924 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-radio-input-element.php'; |
|
925 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-select-element.php'; |
|
926 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-select2-element.php'; |
|
927 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-language-select-element.php'; |
|
928 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-country-select-element.php'; |
|
929 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-tabs-element.php'; |
|
930 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-author-element.php'; |
|
931 | - require_once plugin_dir_path( __DIR__ ) . 'admin/elements/class-wordlift-admin-publisher-element.php'; |
|
932 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-page.php'; |
|
933 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-page.php'; |
|
934 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-analytics-page.php'; |
|
935 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-page-action-link.php'; |
|
936 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-settings-analytics-page-action-link.php'; |
|
922 | + require_once plugin_dir_path(__DIR__).'admin/elements/intf-wordlift-admin-element.php'; |
|
923 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-input-element.php'; |
|
924 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-radio-input-element.php'; |
|
925 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-select-element.php'; |
|
926 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-select2-element.php'; |
|
927 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-language-select-element.php'; |
|
928 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-country-select-element.php'; |
|
929 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-tabs-element.php'; |
|
930 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-author-element.php'; |
|
931 | + require_once plugin_dir_path(__DIR__).'admin/elements/class-wordlift-admin-publisher-element.php'; |
|
932 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-page.php'; |
|
933 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-page.php'; |
|
934 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-analytics-page.php'; |
|
935 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-page-action-link.php'; |
|
936 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-settings-analytics-page-action-link.php'; |
|
937 | 937 | |
938 | 938 | /** Admin Pages */ |
939 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-user-profile-page.php'; |
|
940 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-entity-type-admin-service.php'; |
|
939 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-user-profile-page.php'; |
|
940 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-entity-type-admin-service.php'; |
|
941 | 941 | |
942 | 942 | /** |
943 | 943 | * The class responsible for defining all actions that occur in the public-facing |
944 | 944 | * side of the site. |
945 | 945 | */ |
946 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-public.php'; |
|
946 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-public.php'; |
|
947 | 947 | |
948 | 948 | /** |
949 | 949 | * The shortcode abstract class. |
950 | 950 | */ |
951 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-shortcode.php'; |
|
951 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-shortcode.php'; |
|
952 | 952 | |
953 | 953 | /** |
954 | 954 | * The Timeline shortcode. |
955 | 955 | */ |
956 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-timeline-shortcode.php'; |
|
956 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-timeline-shortcode.php'; |
|
957 | 957 | |
958 | 958 | /** |
959 | 959 | * The Navigator shortcode. |
960 | 960 | */ |
961 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-navigator-shortcode.php'; |
|
961 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-navigator-shortcode.php'; |
|
962 | 962 | |
963 | 963 | /** |
964 | 964 | * The Products Navigator shortcode. |
965 | 965 | */ |
966 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-products-navigator-shortcode.php'; |
|
966 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-products-navigator-shortcode.php'; |
|
967 | 967 | |
968 | 968 | /** |
969 | 969 | * The chord shortcode. |
970 | 970 | */ |
971 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-chord-shortcode.php'; |
|
971 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-chord-shortcode.php'; |
|
972 | 972 | |
973 | 973 | /** |
974 | 974 | * The geomap shortcode. |
975 | 975 | */ |
976 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-geomap-shortcode.php'; |
|
976 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-geomap-shortcode.php'; |
|
977 | 977 | |
978 | 978 | /** |
979 | 979 | * The entity cloud shortcode. |
980 | 980 | */ |
981 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-related-entities-cloud-shortcode.php'; |
|
981 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-related-entities-cloud-shortcode.php'; |
|
982 | 982 | |
983 | 983 | /** |
984 | 984 | * The entity glossary shortcode. |
985 | 985 | */ |
986 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-alphabet-service.php'; |
|
987 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-vocabulary-shortcode.php'; |
|
986 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-alphabet-service.php'; |
|
987 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-vocabulary-shortcode.php'; |
|
988 | 988 | |
989 | 989 | /** |
990 | 990 | * Faceted Search shortcode. |
991 | 991 | */ |
992 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-faceted-search-shortcode.php'; |
|
992 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-faceted-search-shortcode.php'; |
|
993 | 993 | |
994 | 994 | /** |
995 | 995 | * The ShareThis service. |
996 | 996 | */ |
997 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-sharethis-service.php'; |
|
997 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-sharethis-service.php'; |
|
998 | 998 | |
999 | 999 | /** |
1000 | 1000 | * The SEO service. |
1001 | 1001 | */ |
1002 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-seo-service.php'; |
|
1002 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-seo-service.php'; |
|
1003 | 1003 | |
1004 | 1004 | /** |
1005 | 1005 | * The AMP service. |
1006 | 1006 | */ |
1007 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-amp-service.php'; |
|
1007 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-amp-service.php'; |
|
1008 | 1008 | |
1009 | 1009 | /** Widgets */ |
1010 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-widget.php'; |
|
1011 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-related-entities-cloud-widget.php'; |
|
1012 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-context-cards-service.php'; |
|
1010 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-widget.php'; |
|
1011 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-related-entities-cloud-widget.php'; |
|
1012 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-context-cards-service.php'; |
|
1013 | 1013 | |
1014 | 1014 | /* |
1015 | 1015 | * Batch Operations. They're similar to Batch Actions but do not require working on post types. |
@@ -1018,8 +1018,8 @@ discard block |
||
1018 | 1018 | * |
1019 | 1019 | * @since 3.20.0 |
1020 | 1020 | */ |
1021 | - require_once plugin_dir_path( __DIR__ ) . 'includes/batch/intf-wordlift-batch-operation.php'; |
|
1022 | - require_once plugin_dir_path( __DIR__ ) . 'includes/batch/class-wordlift-batch-operation-ajax-adapter.php'; |
|
1021 | + require_once plugin_dir_path(__DIR__).'includes/batch/intf-wordlift-batch-operation.php'; |
|
1022 | + require_once plugin_dir_path(__DIR__).'includes/batch/class-wordlift-batch-operation-ajax-adapter.php'; |
|
1023 | 1023 | |
1024 | 1024 | /* |
1025 | 1025 | * Schema.org Services. |
@@ -1027,10 +1027,10 @@ discard block |
||
1027 | 1027 | * @see https://github.com/insideout10/wordlift-plugin/issues/835 |
1028 | 1028 | */ |
1029 | 1029 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1030 | - if ( apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) ) { |
|
1031 | - require_once plugin_dir_path( __DIR__ ) . 'includes/schemaorg/class-wordlift-schemaorg-sync-service.php'; |
|
1032 | - require_once plugin_dir_path( __DIR__ ) . 'includes/schemaorg/class-wordlift-schemaorg-property-service.php'; |
|
1033 | - require_once plugin_dir_path( __DIR__ ) . 'includes/schemaorg/class-wordlift-schemaorg-class-service.php'; |
|
1030 | + if (apply_filters('wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES)) { |
|
1031 | + require_once plugin_dir_path(__DIR__).'includes/schemaorg/class-wordlift-schemaorg-sync-service.php'; |
|
1032 | + require_once plugin_dir_path(__DIR__).'includes/schemaorg/class-wordlift-schemaorg-property-service.php'; |
|
1033 | + require_once plugin_dir_path(__DIR__).'includes/schemaorg/class-wordlift-schemaorg-class-service.php'; |
|
1034 | 1034 | new Wordlift_Schemaorg_Sync_Service(); |
1035 | 1035 | $schemaorg_property_service = Wordlift_Schemaorg_Property_Service::get_instance(); |
1036 | 1036 | new Wordlift_Schemaorg_Class_Service(); |
@@ -1046,13 +1046,13 @@ discard block |
||
1046 | 1046 | |
1047 | 1047 | // Instantiate a global logger. |
1048 | 1048 | global $wl_logger; |
1049 | - $wl_logger = Wordlift_Log_Service::get_logger( 'WordLift' ); |
|
1049 | + $wl_logger = Wordlift_Log_Service::get_logger('WordLift'); |
|
1050 | 1050 | |
1051 | 1051 | // Load the `wl-api` end-point. |
1052 | 1052 | new Wordlift_Http_Api(); |
1053 | 1053 | |
1054 | 1054 | // Load the Install Service. |
1055 | - require_once plugin_dir_path( __DIR__ ) . 'install/class-wordlift-install-service.php'; |
|
1055 | + require_once plugin_dir_path(__DIR__).'install/class-wordlift-install-service.php'; |
|
1056 | 1056 | $this->install_service = new Wordlift_Install_Service(); |
1057 | 1057 | $this->notice_service = new Wordlift_Notice_Service(); |
1058 | 1058 | $this->user_service = Wordlift_User_Service::get_instance(); |
@@ -1074,21 +1074,21 @@ discard block |
||
1074 | 1074 | add_action( |
1075 | 1075 | 'plugins_loaded', |
1076 | 1076 | // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable |
1077 | - function () use ( &$that, $schemaorg_property_service ) { |
|
1077 | + function() use (&$that, $schemaorg_property_service) { |
|
1078 | 1078 | |
1079 | 1079 | /** Services. */ |
1080 | 1080 | // Create the configuration service. |
1081 | 1081 | new Wordlift_Api_Service(); |
1082 | 1082 | |
1083 | 1083 | // Create an entity link service instance. It'll be later bound to the post_type_link and pre_get_posts actions. |
1084 | - $that->entity_link_service = new Wordlift_Entity_Link_Service( $that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path() ); |
|
1084 | + $that->entity_link_service = new Wordlift_Entity_Link_Service($that->entity_post_type_service, Wordlift_Configuration_Service::get_instance()->get_entity_base_path()); |
|
1085 | 1085 | |
1086 | 1086 | $schema_url_property_service = new Wordlift_Schema_Url_Property_Service(); |
1087 | 1087 | |
1088 | 1088 | $that->entity_uri_service = Wordlift_Entity_Uri_Service::get_instance(); |
1089 | 1089 | |
1090 | 1090 | // Create a new instance of the Redirect service. |
1091 | - $that->redirect_service = new Wordlift_Redirect_Service( $that->entity_uri_service ); |
|
1091 | + $that->redirect_service = new Wordlift_Redirect_Service($that->entity_uri_service); |
|
1092 | 1092 | |
1093 | 1093 | // Create a new instance of the Timeline service and Timeline shortcode. |
1094 | 1094 | $that->timeline_service = new Wordlift_Timeline_Service(); |
@@ -1101,30 +1101,30 @@ discard block |
||
1101 | 1101 | // Create an instance of the PrimaShop adapter. |
1102 | 1102 | $that->primashop_adapter = new Wordlift_PrimaShop_Adapter(); |
1103 | 1103 | |
1104 | - $uri_service = new Wordlift_Uri_Service( $GLOBALS['wpdb'] ); |
|
1104 | + $uri_service = new Wordlift_Uri_Service($GLOBALS['wpdb']); |
|
1105 | 1105 | |
1106 | 1106 | // Create the entity rating service. |
1107 | 1107 | $that->rating_service = Wordlift_Rating_Service::get_instance(); |
1108 | 1108 | |
1109 | 1109 | // Create entity list customization (wp-admin/edit.php). |
1110 | - $that->entity_list_service = new Wordlift_Entity_List_Service( $that->rating_service ); |
|
1110 | + $that->entity_list_service = new Wordlift_Entity_List_Service($that->rating_service); |
|
1111 | 1111 | |
1112 | 1112 | // Create an instance of the Publisher Service and the AJAX Adapter. |
1113 | 1113 | $that->publisher_service = Wordlift_Publisher_Service::get_instance(); |
1114 | - $that->property_factory = new Wordlift_Property_Factory( $schema_url_property_service ); |
|
1115 | - $that->property_factory->register( Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service ); |
|
1114 | + $that->property_factory = new Wordlift_Property_Factory($schema_url_property_service); |
|
1115 | + $that->property_factory->register(Wordlift_Schema_Url_Property_Service::META_KEY, $schema_url_property_service); |
|
1116 | 1116 | |
1117 | 1117 | $attachment_service = Wordlift_Attachment_Service::get_instance(); |
1118 | 1118 | |
1119 | 1119 | // Instantiate the JSON-LD service. |
1120 | 1120 | $property_getter = Wordlift_Property_Getter_Factory::create(); |
1121 | - $that->post_to_jsonld_converter = new Wordlift_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service ); |
|
1122 | - $that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter ); |
|
1123 | - $that->postid_to_jsonld_converter = new Wordlift_Postid_To_Jsonld_Converter( $that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter ); |
|
1124 | - $that->jsonld_website_converter = new Wordlift_Website_Jsonld_Converter( Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service ); |
|
1121 | + $that->post_to_jsonld_converter = new Wordlift_Post_To_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service); |
|
1122 | + $that->entity_post_to_jsonld_converter = new Wordlift_Entity_Post_To_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service, $property_getter, $schemaorg_property_service, $that->post_to_jsonld_converter); |
|
1123 | + $that->postid_to_jsonld_converter = new Wordlift_Postid_To_Jsonld_Converter($that->entity_post_to_jsonld_converter, $that->post_to_jsonld_converter); |
|
1124 | + $that->jsonld_website_converter = new Wordlift_Website_Jsonld_Converter(Wordlift_Entity_Type_Service::get_instance(), $that->user_service, $attachment_service); |
|
1125 | 1125 | |
1126 | - $jsonld_cache = new Ttl_Cache( 'jsonld', 86400 ); |
|
1127 | - $that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter( $that->postid_to_jsonld_converter, $jsonld_cache ); |
|
1126 | + $jsonld_cache = new Ttl_Cache('jsonld', 86400); |
|
1127 | + $that->cached_postid_to_jsonld_converter = new Wordlift_Cached_Post_Converter($that->postid_to_jsonld_converter, $jsonld_cache); |
|
1128 | 1128 | /* |
1129 | 1129 | * Load the `Wordlift_Term_JsonLd_Adapter`. |
1130 | 1130 | * |
@@ -1132,22 +1132,22 @@ discard block |
||
1132 | 1132 | * |
1133 | 1133 | * @since 3.20.0 |
1134 | 1134 | */ |
1135 | - require_once plugin_dir_path( __DIR__ ) . 'public/class-wordlift-term-jsonld-adapter.php'; |
|
1135 | + require_once plugin_dir_path(__DIR__).'public/class-wordlift-term-jsonld-adapter.php'; |
|
1136 | 1136 | |
1137 | - $term_jsonld_adapter = new Wordlift_Term_JsonLd_Adapter( $that->entity_uri_service, $that->cached_postid_to_jsonld_converter ); |
|
1138 | - $that->jsonld_service = new Wordlift_Jsonld_Service( Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter ); |
|
1137 | + $term_jsonld_adapter = new Wordlift_Term_JsonLd_Adapter($that->entity_uri_service, $that->cached_postid_to_jsonld_converter); |
|
1138 | + $that->jsonld_service = new Wordlift_Jsonld_Service(Wordlift_Entity_Service::get_instance(), $that->cached_postid_to_jsonld_converter, $that->jsonld_website_converter, $term_jsonld_adapter); |
|
1139 | 1139 | |
1140 | 1140 | $jsonld_service = new Jsonld_Service( |
1141 | 1141 | $that->jsonld_service, |
1142 | 1142 | $term_jsonld_adapter, |
1143 | - new Jsonld_User_Service( $that->user_service ) |
|
1143 | + new Jsonld_User_Service($that->user_service) |
|
1144 | 1144 | ); |
1145 | - new Jsonld_Endpoint( $jsonld_service, $that->entity_uri_service ); |
|
1145 | + new Jsonld_Endpoint($jsonld_service, $that->entity_uri_service); |
|
1146 | 1146 | |
1147 | 1147 | // Prints the JSON-LD in the head. |
1148 | - new Jsonld_Adapter( $that->jsonld_service ); |
|
1148 | + new Jsonld_Adapter($that->jsonld_service); |
|
1149 | 1149 | |
1150 | - new Jsonld_By_Id_Endpoint( $that->jsonld_service, $that->entity_uri_service ); |
|
1150 | + new Jsonld_By_Id_Endpoint($that->jsonld_service, $that->entity_uri_service); |
|
1151 | 1151 | |
1152 | 1152 | /** |
1153 | 1153 | * @since 3.37.1 |
@@ -1161,10 +1161,10 @@ discard block |
||
1161 | 1161 | // Creating Faq Content filter service. |
1162 | 1162 | $that->faq_content_filter_service = new Faq_Content_Filter(); |
1163 | 1163 | $that->sample_data_service = Wordlift_Sample_Data_Service::get_instance(); |
1164 | - $that->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter( $that->sample_data_service ); |
|
1164 | + $that->sample_data_ajax_adapter = new Wordlift_Sample_Data_Ajax_Adapter($that->sample_data_service); |
|
1165 | 1165 | |
1166 | - $that->loader->add_action( 'enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks' ); |
|
1167 | - $that->loader->add_action( 'admin_enqueue_scripts', $that, 'add_wl_enabled_blocks' ); |
|
1166 | + $that->loader->add_action('enqueue_block_editor_assets', $that, 'add_wl_enabled_blocks'); |
|
1167 | + $that->loader->add_action('admin_enqueue_scripts', $that, 'add_wl_enabled_blocks'); |
|
1168 | 1168 | |
1169 | 1169 | /** |
1170 | 1170 | * Filter: wl_feature__enable__blocks. |
@@ -1174,15 +1174,15 @@ discard block |
||
1174 | 1174 | * @return bool |
1175 | 1175 | * @since 3.27.6 |
1176 | 1176 | */ |
1177 | - if ( apply_filters( 'wl_feature__enable__blocks', true ) ) { |
|
1177 | + if (apply_filters('wl_feature__enable__blocks', true)) { |
|
1178 | 1178 | // Initialize the short-codes. |
1179 | - new Async_Template_Decorator( new Wordlift_Navigator_Shortcode() ); |
|
1179 | + new Async_Template_Decorator(new Wordlift_Navigator_Shortcode()); |
|
1180 | 1180 | new Wordlift_Chord_Shortcode(); |
1181 | 1181 | new Wordlift_Geomap_Shortcode(); |
1182 | 1182 | new Wordlift_Timeline_Shortcode(); |
1183 | - new Wordlift_Related_Entities_Cloud_Shortcode( Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance() ); |
|
1183 | + new Wordlift_Related_Entities_Cloud_Shortcode(Wordlift_Relation_Service::get_instance(), Wordlift_Entity_Service::get_instance()); |
|
1184 | 1184 | new Wordlift_Vocabulary_Shortcode(); |
1185 | - new Async_Template_Decorator( new Wordlift_Faceted_Search_Shortcode() ); |
|
1185 | + new Async_Template_Decorator(new Wordlift_Faceted_Search_Shortcode()); |
|
1186 | 1186 | } |
1187 | 1187 | |
1188 | 1188 | new Wordlift_Products_Navigator_Shortcode(); |
@@ -1194,16 +1194,16 @@ discard block |
||
1194 | 1194 | new Wordlift_Seo_Service(); |
1195 | 1195 | |
1196 | 1196 | // Initialize the AMP service. |
1197 | - new Wordlift_AMP_Service( $that->jsonld_service ); |
|
1197 | + new Wordlift_AMP_Service($that->jsonld_service); |
|
1198 | 1198 | |
1199 | 1199 | /** Services. */ |
1200 | 1200 | $that->google_analytics_export_service = new Wordlift_Google_Analytics_Export_Service(); |
1201 | 1201 | new Wordlift_Image_Service(); |
1202 | 1202 | |
1203 | 1203 | /** Adapters. */ |
1204 | - $that->entity_type_adapter = new Wordlift_Entity_Type_Adapter( Wordlift_Entity_Type_Service::get_instance() ); |
|
1205 | - $that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter( $that->publisher_service ); |
|
1206 | - $that->tinymce_adapter = new Wordlift_Tinymce_Adapter( $that ); |
|
1204 | + $that->entity_type_adapter = new Wordlift_Entity_Type_Adapter(Wordlift_Entity_Type_Service::get_instance()); |
|
1205 | + $that->publisher_ajax_adapter = new Wordlift_Publisher_Ajax_Adapter($that->publisher_service); |
|
1206 | + $that->tinymce_adapter = new Wordlift_Tinymce_Adapter($that); |
|
1207 | 1207 | |
1208 | 1208 | /* |
1209 | 1209 | * Exclude our public js from WP-Rocket. |
@@ -1227,14 +1227,14 @@ discard block |
||
1227 | 1227 | $that->language_select_element = new Wordlift_Admin_Language_Select_Element(); |
1228 | 1228 | $that->country_select_element = new Wordlift_Admin_Country_Select_Element(); |
1229 | 1229 | $tabs_element = new Wordlift_Admin_Tabs_Element(); |
1230 | - $that->publisher_element = new Wordlift_Admin_Publisher_Element( $that->publisher_service, $tabs_element, $that->select2_element ); |
|
1231 | - $that->author_element = new Wordlift_Admin_Author_Element( $that->publisher_service, $that->select2_element ); |
|
1230 | + $that->publisher_element = new Wordlift_Admin_Publisher_Element($that->publisher_service, $tabs_element, $that->select2_element); |
|
1231 | + $that->author_element = new Wordlift_Admin_Author_Element($that->publisher_service, $that->select2_element); |
|
1232 | 1232 | |
1233 | 1233 | $that->settings_page = Wordlift_Admin_Settings_Page::get_instance(); |
1234 | - $that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link( $that->settings_page ); |
|
1234 | + $that->settings_page_action_link = new Wordlift_Admin_Settings_Page_Action_Link($that->settings_page); |
|
1235 | 1235 | |
1236 | - $that->analytics_settings_page = new Wordlift_Admin_Settings_Analytics_Page( $that->input_element, $that->radio_input_element ); |
|
1237 | - $that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link( $that->analytics_settings_page ); |
|
1236 | + $that->analytics_settings_page = new Wordlift_Admin_Settings_Analytics_Page($that->input_element, $that->radio_input_element); |
|
1237 | + $that->analytics_settings_page_action_link = new Wordlift_Admin_Settings_Analytics_Page_Action_Link($that->analytics_settings_page); |
|
1238 | 1238 | $that->analytics_connect = new Wordlift_Analytics_Connect(); |
1239 | 1239 | |
1240 | 1240 | // Pages. |
@@ -1245,9 +1245,9 @@ discard block |
||
1245 | 1245 | * |
1246 | 1246 | * @see https://github.com/insideout10/wordlift-plugin/issues/914 |
1247 | 1247 | */ |
1248 | - if ( apply_filters( 'wl_can_see_classification_box', true ) ) { |
|
1249 | - require_once plugin_dir_path( __DIR__ ) . 'admin/class-wordlift-admin-post-edit-page.php'; |
|
1250 | - new Wordlift_Admin_Post_Edit_Page( $that ); |
|
1248 | + if (apply_filters('wl_can_see_classification_box', true)) { |
|
1249 | + require_once plugin_dir_path(__DIR__).'admin/class-wordlift-admin-post-edit-page.php'; |
|
1250 | + new Wordlift_Admin_Post_Edit_Page($that); |
|
1251 | 1251 | } |
1252 | 1252 | new Wordlift_Entity_Type_Admin_Service(); |
1253 | 1253 | |
@@ -1255,19 +1255,19 @@ discard block |
||
1255 | 1255 | $that->related_entities_cloud_widget = new Wordlift_Related_Entities_Cloud_Widget(); |
1256 | 1256 | |
1257 | 1257 | // Create an instance of the install wizard. |
1258 | - $that->admin_setup = new Wordlift_Admin_Setup( $that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element ); |
|
1258 | + $that->admin_setup = new Wordlift_Admin_Setup($that->key_validation_service, Wordlift_Entity_Service::get_instance(), $that->language_select_element, $that->country_select_element); |
|
1259 | 1259 | |
1260 | - $that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service( $that->entity_post_type_service ); |
|
1260 | + $that->category_taxonomy_service = new Wordlift_Category_Taxonomy_Service($that->entity_post_type_service); |
|
1261 | 1261 | |
1262 | 1262 | // User Profile. |
1263 | - new Wordlift_Admin_User_Profile_Page( $that->author_element, $that->user_service ); |
|
1263 | + new Wordlift_Admin_User_Profile_Page($that->author_element, $that->user_service); |
|
1264 | 1264 | |
1265 | 1265 | $that->entity_page_service = new Wordlift_Entity_Page_Service(); |
1266 | 1266 | |
1267 | 1267 | // Load the debug service if WP is in debug mode. |
1268 | - if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { |
|
1269 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-debug-service.php'; |
|
1270 | - new Wordlift_Debug_Service( Wordlift_Entity_Service::get_instance(), $uri_service ); |
|
1268 | + if (defined('WP_DEBUG') && WP_DEBUG) { |
|
1269 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-debug-service.php'; |
|
1270 | + new Wordlift_Debug_Service(Wordlift_Entity_Service::get_instance(), $uri_service); |
|
1271 | 1271 | } |
1272 | 1272 | |
1273 | 1273 | // Remote Image Service. |
@@ -1280,12 +1280,12 @@ discard block |
||
1280 | 1280 | * |
1281 | 1281 | * @see https://github.com/insideout10/wordlift-plugin/issues/852. |
1282 | 1282 | */ |
1283 | - require_once plugin_dir_path( __DIR__ ) . 'includes/class-wordlift-batch-action.php'; |
|
1284 | - require_once plugin_dir_path( __DIR__ ) . 'includes/mapping/class-wordlift-mapping-service.php'; |
|
1285 | - require_once plugin_dir_path( __DIR__ ) . 'includes/mapping/class-wordlift-mapping-ajax-adapter.php'; |
|
1283 | + require_once plugin_dir_path(__DIR__).'includes/class-wordlift-batch-action.php'; |
|
1284 | + require_once plugin_dir_path(__DIR__).'includes/mapping/class-wordlift-mapping-service.php'; |
|
1285 | + require_once plugin_dir_path(__DIR__).'includes/mapping/class-wordlift-mapping-ajax-adapter.php'; |
|
1286 | 1286 | |
1287 | 1287 | // Create an instance of the Mapping Service and assign it to the Ajax Adapter. |
1288 | - new Wordlift_Mapping_Ajax_Adapter( new Wordlift_Mapping_Service( Wordlift_Entity_Type_Service::get_instance() ) ); |
|
1288 | + new Wordlift_Mapping_Ajax_Adapter(new Wordlift_Mapping_Service(Wordlift_Entity_Type_Service::get_instance())); |
|
1289 | 1289 | |
1290 | 1290 | /* |
1291 | 1291 | * Load the Mappings JSON-LD post processing. |
@@ -1299,11 +1299,11 @@ discard block |
||
1299 | 1299 | // Taxonomy term rule validator for validating rules for term pages. |
1300 | 1300 | new Taxonomy_Term_Rule_Validator(); |
1301 | 1301 | new Post_Taxonomy_Term_Rule_Validator(); |
1302 | - $rule_validators_registry = new Rule_Validators_Registry( $default_rule_validator ); |
|
1303 | - $rule_groups_validator = new Rule_Groups_Validator( $rule_validators_registry ); |
|
1304 | - $mappings_validator = new Mappings_Validator( $mappings_dbo, $rule_groups_validator ); |
|
1302 | + $rule_validators_registry = new Rule_Validators_Registry($default_rule_validator); |
|
1303 | + $rule_groups_validator = new Rule_Groups_Validator($rule_validators_registry); |
|
1304 | + $mappings_validator = new Mappings_Validator($mappings_dbo, $rule_groups_validator); |
|
1305 | 1305 | |
1306 | - new Url_To_Entity_Transform_Function( $that->entity_uri_service ); |
|
1306 | + new Url_To_Entity_Transform_Function($that->entity_uri_service); |
|
1307 | 1307 | new Taxonomy_To_Terms_Transform_Function(); |
1308 | 1308 | new Post_Id_To_Entity_Transform_Function(); |
1309 | 1309 | $mappings_transform_functions_registry = new Mappings_Transform_Functions_Registry(); |
@@ -1313,7 +1313,7 @@ discard block |
||
1313 | 1313 | * Intiailize the acf group data formatter. |
1314 | 1314 | */ |
1315 | 1315 | new Acf_Group_Formatter(); |
1316 | - new Jsonld_Converter( $mappings_validator, $mappings_transform_functions_registry ); |
|
1316 | + new Jsonld_Converter($mappings_validator, $mappings_transform_functions_registry); |
|
1317 | 1317 | |
1318 | 1318 | /** |
1319 | 1319 | * @since 3.26.0 |
@@ -1331,16 +1331,16 @@ discard block |
||
1331 | 1331 | // Call this static method to register FAQ routes to rest api - disabled |
1332 | 1332 | // Faq_Rest_Controller::register_routes(); |
1333 | 1333 | |
1334 | - $that->storage_factory = new Wordlift_Storage_Factory( Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter ); |
|
1334 | + $that->storage_factory = new Wordlift_Storage_Factory(Wordlift_Entity_Service::get_instance(), $that->user_service, $property_getter); |
|
1335 | 1335 | |
1336 | 1336 | /** WL Autocomplete. */ |
1337 | - $autocomplete_service = new All_Autocomplete_Service( |
|
1337 | + $autocomplete_service = new All_Autocomplete_Service( |
|
1338 | 1338 | array( |
1339 | 1339 | new Local_Autocomplete_Service(), |
1340 | - new Linked_Data_Autocomplete_Service( Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance() ), |
|
1340 | + new Linked_Data_Autocomplete_Service(Entity_Helper::get_instance(), $that->entity_uri_service, Wordlift_Entity_Service::get_instance()), |
|
1341 | 1341 | ) |
1342 | 1342 | ); |
1343 | - $that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter( $autocomplete_service ); |
|
1343 | + $that->autocomplete_adapter = new Wordlift_Autocomplete_Adapter($autocomplete_service); |
|
1344 | 1344 | |
1345 | 1345 | /** |
1346 | 1346 | * @since 3.27.2 |
@@ -1349,10 +1349,10 @@ discard block |
||
1349 | 1349 | */ |
1350 | 1350 | new Recipe_Maker_Post_Type_Hook(); |
1351 | 1351 | $recipe_maker_validation_service = new Recipe_Maker_Validation_Service(); |
1352 | - new Recipe_Maker_Jsonld_Hook( $attachment_service, $recipe_maker_validation_service ); |
|
1353 | - new Recipe_Maker_After_Get_Jsonld_Hook( $recipe_maker_validation_service ); |
|
1354 | - new Recipe_Maker_Jsonld_Swap( $recipe_maker_validation_service, $that->jsonld_service ); |
|
1355 | - new Recipe_Maker_Warning( $recipe_maker_validation_service ); |
|
1352 | + new Recipe_Maker_Jsonld_Hook($attachment_service, $recipe_maker_validation_service); |
|
1353 | + new Recipe_Maker_After_Get_Jsonld_Hook($recipe_maker_validation_service); |
|
1354 | + new Recipe_Maker_Jsonld_Swap($recipe_maker_validation_service, $that->jsonld_service); |
|
1355 | + new Recipe_Maker_Warning($recipe_maker_validation_service); |
|
1356 | 1356 | |
1357 | 1357 | /** |
1358 | 1358 | * Avada Builder compatibility. |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | * @since 3.27.8 |
1368 | 1368 | * @see https://github.com/insideout10/wordlift-plugin/issues/1248 |
1369 | 1369 | */ |
1370 | - new Key_Validation_Notice( $that->key_validation_service, Wordlift_Configuration_Service::get_instance() ); |
|
1370 | + new Key_Validation_Notice($that->key_validation_service, Wordlift_Configuration_Service::get_instance()); |
|
1371 | 1371 | |
1372 | 1372 | /** |
1373 | 1373 | * @since 3.28.0 |
@@ -1379,7 +1379,7 @@ discard block |
||
1379 | 1379 | * @since 3.29.0 |
1380 | 1380 | * @see https://github.com/insideout10/wordlift-plugin/issues/1304 |
1381 | 1381 | */ |
1382 | - new Entity_Rest_Service( Wordlift_Entity_Type_Service::get_instance() ); |
|
1382 | + new Entity_Rest_Service(Wordlift_Entity_Type_Service::get_instance()); |
|
1383 | 1383 | |
1384 | 1384 | /** |
1385 | 1385 | * Expand author in to references. |
@@ -1388,12 +1388,12 @@ discard block |
||
1388 | 1388 | * @see https://github.com/insideout10/wordlift-plugin/issues/1318 |
1389 | 1389 | */ |
1390 | 1390 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1391 | - if ( apply_filters( 'wl_feature__enable__article-wrapper', false ) ) { |
|
1392 | - new Jsonld_Article_Wrapper( Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter ); |
|
1391 | + if (apply_filters('wl_feature__enable__article-wrapper', false)) { |
|
1392 | + new Jsonld_Article_Wrapper(Wordlift_Post_To_Jsonld_Converter::get_instance(), $that->cached_postid_to_jsonld_converter); |
|
1393 | 1393 | } |
1394 | 1394 | |
1395 | 1395 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1396 | - if ( apply_filters( 'wl_feature__enable__match-terms', false ) ) { |
|
1396 | + if (apply_filters('wl_feature__enable__match-terms', false)) { |
|
1397 | 1397 | $vocabulary_loader = new Vocabulary_Loader(); |
1398 | 1398 | $vocabulary_loader->init_vocabulary(); |
1399 | 1399 | } |
@@ -1401,7 +1401,7 @@ discard block |
||
1401 | 1401 | /** |
1402 | 1402 | * Added for feature request 1496 (Webhooks) |
1403 | 1403 | */ |
1404 | - if ( apply_filters( 'wl_feature__enable__webhooks', false ) ) { |
|
1404 | + if (apply_filters('wl_feature__enable__webhooks', false)) { |
|
1405 | 1405 | $that->webhook_loader = new Webhooks_Loader(); |
1406 | 1406 | $that->webhook_loader->init(); |
1407 | 1407 | } |
@@ -1430,7 +1430,7 @@ discard block |
||
1430 | 1430 | * @since 3.31.5 |
1431 | 1431 | * Create configuration endpoint for webapp to configure. |
1432 | 1432 | */ |
1433 | - new Config( $that->admin_setup, $that->key_validation_service ); |
|
1433 | + new Config($that->admin_setup, $that->key_validation_service); |
|
1434 | 1434 | /** |
1435 | 1435 | * @since 3.31.7 |
1436 | 1436 | * Remove duplicate videoobject. |
@@ -1442,7 +1442,7 @@ discard block |
||
1442 | 1442 | * @since 3.32.0 |
1443 | 1443 | * Create loader for vocabulary terms. |
1444 | 1444 | */ |
1445 | - $vocabulary_terms_loader = new Vocabulary_Terms_Loader( Wordlift_Entity_Type_Service::get_instance(), $property_getter ); |
|
1445 | + $vocabulary_terms_loader = new Vocabulary_Terms_Loader(Wordlift_Entity_Type_Service::get_instance(), $property_getter); |
|
1446 | 1446 | $vocabulary_terms_loader->init_feature(); |
1447 | 1447 | |
1448 | 1448 | new Entity_Type_Change_Handler( |
@@ -1471,9 +1471,9 @@ discard block |
||
1471 | 1471 | private function set_locale() { |
1472 | 1472 | |
1473 | 1473 | $plugin_i18n = new Wordlift_I18n(); |
1474 | - $plugin_i18n->set_domain( $this->get_plugin_name() ); |
|
1474 | + $plugin_i18n->set_domain($this->get_plugin_name()); |
|
1475 | 1475 | |
1476 | - $this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' ); |
|
1476 | + $this->loader->add_action('plugins_loaded', $plugin_i18n, 'load_plugin_textdomain'); |
|
1477 | 1477 | |
1478 | 1478 | } |
1479 | 1479 | |
@@ -1484,7 +1484,7 @@ discard block |
||
1484 | 1484 | * @since 1.0.0 |
1485 | 1485 | * @access private |
1486 | 1486 | */ |
1487 | - private function define_admin_hooks( $that ) { |
|
1487 | + private function define_admin_hooks($that) { |
|
1488 | 1488 | $plugin_admin = new Wordlift_Admin( |
1489 | 1489 | $that->get_plugin_name(), |
1490 | 1490 | $that->get_version(), |
@@ -1492,51 +1492,51 @@ discard block |
||
1492 | 1492 | $that->user_service |
1493 | 1493 | ); |
1494 | 1494 | |
1495 | - $that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_styles' ); |
|
1496 | - $that->loader->add_action( 'admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11 ); |
|
1495 | + $that->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_styles'); |
|
1496 | + $that->loader->add_action('admin_enqueue_scripts', $plugin_admin, 'enqueue_scripts', 11); |
|
1497 | 1497 | |
1498 | 1498 | // Hook the `admin_init` function to the Admin Setup. |
1499 | - Assertions::is_set( $that->admin_setup, '`admin_setup` must be set' ); |
|
1500 | - $that->loader->add_action( 'admin_init', $that->admin_setup, 'admin_init' ); |
|
1499 | + Assertions::is_set($that->admin_setup, '`admin_setup` must be set'); |
|
1500 | + $that->loader->add_action('admin_init', $that->admin_setup, 'admin_init'); |
|
1501 | 1501 | |
1502 | 1502 | // Hook the admin_init to the settings page. |
1503 | - Assertions::is_set( $that->settings_page, '`setting_page` must be set' ); |
|
1504 | - $that->loader->add_action( 'admin_init', $that->settings_page, 'admin_init' ); |
|
1503 | + Assertions::is_set($that->settings_page, '`setting_page` must be set'); |
|
1504 | + $that->loader->add_action('admin_init', $that->settings_page, 'admin_init'); |
|
1505 | 1505 | |
1506 | 1506 | // Hook the admin_init to the analytics settings page. |
1507 | - Assertions::is_set( $that->analytics_settings_page, '`analytics_setting_page` must be set' ); |
|
1508 | - $that->loader->add_action( 'admin_init', $that->analytics_settings_page, 'admin_init' ); |
|
1507 | + Assertions::is_set($that->analytics_settings_page, '`analytics_setting_page` must be set'); |
|
1508 | + $that->loader->add_action('admin_init', $that->analytics_settings_page, 'admin_init'); |
|
1509 | 1509 | |
1510 | 1510 | // Hook the init action to taxonomy services. |
1511 | - $that->loader->add_action( 'init', $that->topic_taxonomy_service, 'init', 0 ); |
|
1512 | - $that->loader->add_action( 'init', $that->entity_types_taxonomy_service, 'init', 0 ); |
|
1511 | + $that->loader->add_action('init', $that->topic_taxonomy_service, 'init', 0); |
|
1512 | + $that->loader->add_action('init', $that->entity_types_taxonomy_service, 'init', 0); |
|
1513 | 1513 | |
1514 | 1514 | // Hook the AJAX wl_timeline action to the Timeline service. |
1515 | - $that->loader->add_action( 'wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline' ); |
|
1515 | + $that->loader->add_action('wp_ajax_wl_timeline', $that->timeline_service, 'ajax_timeline'); |
|
1516 | 1516 | |
1517 | 1517 | // Register custom allowed redirect hosts. |
1518 | - $that->loader->add_filter( 'allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts' ); |
|
1518 | + $that->loader->add_filter('allowed_redirect_hosts', $that->redirect_service, 'allowed_redirect_hosts'); |
|
1519 | 1519 | // Hook the AJAX wordlift_redirect action to the Redirect service. |
1520 | - $that->loader->add_action( 'wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect' ); |
|
1520 | + $that->loader->add_action('wp_ajax_wordlift_redirect', $that->redirect_service, 'ajax_redirect'); |
|
1521 | 1521 | |
1522 | 1522 | // Hook save_post to the entity service to update custom fields (such as alternate labels). |
1523 | 1523 | // We have a priority of 9 because we want to be executed before data is sent to Redlink. |
1524 | - $that->loader->add_action( 'save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 2 ); |
|
1525 | - $that->loader->add_action( 'save_post', $that->rating_service, 'set_rating_for', 20, 1 ); |
|
1524 | + $that->loader->add_action('save_post', Wordlift_Entity_Service::get_instance(), 'save_post', 9, 2); |
|
1525 | + $that->loader->add_action('save_post', $that->rating_service, 'set_rating_for', 20, 1); |
|
1526 | 1526 | |
1527 | - $that->loader->add_action( 'edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1 ); |
|
1528 | - $that->loader->add_action( 'in_admin_header', $that->rating_service, 'in_admin_header' ); |
|
1527 | + $that->loader->add_action('edit_form_before_permalink', Wordlift_Entity_Service::get_instance(), 'edit_form_before_permalink', 10, 1); |
|
1528 | + $that->loader->add_action('in_admin_header', $that->rating_service, 'in_admin_header'); |
|
1529 | 1529 | |
1530 | 1530 | // Entity listing customization (wp-admin/edit.php) |
1531 | 1531 | // Add custom columns. |
1532 | - $that->loader->add_filter( 'manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns' ); |
|
1532 | + $that->loader->add_filter('manage_entity_posts_columns', $that->entity_list_service, 'register_custom_columns'); |
|
1533 | 1533 | // no explicit entity as it prevents handling of other post types. |
1534 | - $that->loader->add_filter( 'manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2 ); |
|
1534 | + $that->loader->add_filter('manage_posts_custom_column', $that->entity_list_service, 'render_custom_columns', 10, 2); |
|
1535 | 1535 | // Add 4W selection. |
1536 | - $that->loader->add_action( 'restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope' ); |
|
1537 | - $that->loader->add_filter( 'posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope' ); |
|
1538 | - $that->loader->add_action( 'pre_get_posts', $that->entity_list_service, 'pre_get_posts' ); |
|
1539 | - $that->loader->add_action( 'load-edit.php', $that->entity_list_service, 'load_edit' ); |
|
1536 | + $that->loader->add_action('restrict_manage_posts', $that->entity_list_service, 'restrict_manage_posts_classification_scope'); |
|
1537 | + $that->loader->add_filter('posts_clauses', $that->entity_list_service, 'posts_clauses_classification_scope'); |
|
1538 | + $that->loader->add_action('pre_get_posts', $that->entity_list_service, 'pre_get_posts'); |
|
1539 | + $that->loader->add_action('load-edit.php', $that->entity_list_service, 'load_edit'); |
|
1540 | 1540 | |
1541 | 1541 | /* |
1542 | 1542 | * If `All Entity Types` is disable, use the radio button Walker. |
@@ -1544,18 +1544,18 @@ discard block |
||
1544 | 1544 | * @see https://github.com/insideout10/wordlift-plugin/issues/835 |
1545 | 1545 | */ |
1546 | 1546 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1547 | - if ( ! apply_filters( 'wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES ) |
|
1547 | + if ( ! apply_filters('wl_feature__enable__all-entity-types', WL_ALL_ENTITY_TYPES) |
|
1548 | 1548 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1549 | - && ! apply_filters( 'wl_feature__enable__entity-types-professional', false ) |
|
1549 | + && ! apply_filters('wl_feature__enable__entity-types-professional', false) |
|
1550 | 1550 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1551 | - && ! apply_filters( 'wl_feature__enable__entity-types-business', false ) |
|
1551 | + && ! apply_filters('wl_feature__enable__entity-types-business', false) |
|
1552 | 1552 | ) { |
1553 | - $that->loader->add_filter( 'wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args' ); |
|
1553 | + $that->loader->add_filter('wp_terms_checklist_args', $that->entity_types_taxonomy_walker, 'terms_checklist_args'); |
|
1554 | 1554 | } |
1555 | 1555 | |
1556 | 1556 | // Hook the PrimaShop adapter to <em>prima_metabox_entity_header_args</em> in order to add header support for |
1557 | 1557 | // entities. |
1558 | - $that->loader->add_filter( 'prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10 ); |
|
1558 | + $that->loader->add_filter('prima_metabox_entity_header_args', $that->primashop_adapter, 'prima_metabox_entity_header_args', 10); |
|
1559 | 1559 | |
1560 | 1560 | /** |
1561 | 1561 | * Filter: wl_feature__enable__settings-download. |
@@ -1575,20 +1575,20 @@ discard block |
||
1575 | 1575 | ); |
1576 | 1576 | |
1577 | 1577 | // Hook the admin-ajax.php?action=wl_download_your_data&out=xyz links. |
1578 | - $that->loader->add_action( 'wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10 ); |
|
1578 | + $that->loader->add_action('wp_ajax_wl_download_your_data', $that->download_your_data_page, 'download_your_data', 10); |
|
1579 | 1579 | |
1580 | 1580 | // Hook the AJAX wl_jsonld action to the JSON-LD service. |
1581 | - $that->loader->add_action( 'wp_ajax_wl_jsonld', $that->jsonld_service, 'get' ); |
|
1582 | - $that->loader->add_action( 'admin_post_wl_jsonld', $that->jsonld_service, 'get' ); |
|
1583 | - $that->loader->add_action( 'admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get' ); |
|
1581 | + $that->loader->add_action('wp_ajax_wl_jsonld', $that->jsonld_service, 'get'); |
|
1582 | + $that->loader->add_action('admin_post_wl_jsonld', $that->jsonld_service, 'get'); |
|
1583 | + $that->loader->add_action('admin_post_nopriv_wl_jsonld', $that->jsonld_service, 'get'); |
|
1584 | 1584 | |
1585 | 1585 | // Hook the AJAX wl_validate_key action to the Key Validation service. |
1586 | - $that->loader->add_action( 'wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key' ); |
|
1586 | + $that->loader->add_action('wp_ajax_wl_validate_key', $that->key_validation_service, 'validate_key'); |
|
1587 | 1587 | |
1588 | 1588 | // Hook the AJAX wl_update_country_options action to the countries. |
1589 | - $that->loader->add_action( 'wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html' ); |
|
1589 | + $that->loader->add_action('wp_ajax_wl_update_country_options', $that->country_select_element, 'get_options_html'); |
|
1590 | 1590 | |
1591 | - $that->loader->add_filter( 'admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction' ); |
|
1591 | + $that->loader->add_filter('admin_post_thumbnail_html', $that->publisher_service, 'add_featured_image_instruction'); |
|
1592 | 1592 | |
1593 | 1593 | // Hook the menu creation on the general wordlift menu creation. |
1594 | 1594 | /** |
@@ -1602,16 +1602,16 @@ discard block |
||
1602 | 1602 | * Since 3.30.0 this feature is registered using registry. |
1603 | 1603 | */ |
1604 | 1604 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1605 | - if ( apply_filters( 'wl_feature__enable__settings-screen', true ) || Admin_User_Option::is_wordlift_admin() ) { |
|
1606 | - add_action( 'wl_admin_menu', array( $that->settings_page, 'admin_menu' ), 10, 2 ); |
|
1605 | + if (apply_filters('wl_feature__enable__settings-screen', true) || Admin_User_Option::is_wordlift_admin()) { |
|
1606 | + add_action('wl_admin_menu', array($that->settings_page, 'admin_menu'), 10, 2); |
|
1607 | 1607 | } |
1608 | 1608 | |
1609 | 1609 | // Hook key update. |
1610 | - $that->loader->add_action( 'pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2 ); |
|
1611 | - $that->loader->add_action( 'update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2 ); |
|
1610 | + $that->loader->add_action('pre_update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'maybe_update_dataset_uri', 10, 2); |
|
1611 | + $that->loader->add_action('update_option_wl_general_settings', Wordlift_Configuration_Service::get_instance(), 'update_key', 10, 2); |
|
1612 | 1612 | |
1613 | 1613 | // Add additional action links to the WordLift plugin in the plugins page. |
1614 | - $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1 ); |
|
1614 | + $that->loader->add_filter('plugin_action_links_wordlift/wordlift.php', $that->settings_page_action_link, 'action_links', 10, 1); |
|
1615 | 1615 | |
1616 | 1616 | /* |
1617 | 1617 | * Remove the Analytics Settings link from the plugin page. |
@@ -1622,23 +1622,23 @@ discard block |
||
1622 | 1622 | // $that->loader->add_filter( 'plugin_action_links_wordlift/wordlift.php', $that->analytics_settings_page_action_link, 'action_links', 10, 1 ); |
1623 | 1623 | |
1624 | 1624 | // Hook the AJAX `wl_publisher` action name. |
1625 | - $that->loader->add_action( 'wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher' ); |
|
1625 | + $that->loader->add_action('wp_ajax_wl_publisher', $that->publisher_ajax_adapter, 'publisher'); |
|
1626 | 1626 | |
1627 | 1627 | // Hook row actions for the entity type list admin. |
1628 | - $that->loader->add_filter( 'wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2 ); |
|
1628 | + $that->loader->add_filter('wl_entity_type_row_actions', $that->entity_type_admin_page, 'wl_entity_type_row_actions', 10, 2); |
|
1629 | 1629 | |
1630 | 1630 | /** Ajax actions. */ |
1631 | - $that->loader->add_action( 'wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export' ); |
|
1631 | + $that->loader->add_action('wp_ajax_wl_google_analytics_export', $that->google_analytics_export_service, 'export'); |
|
1632 | 1632 | |
1633 | 1633 | // Hook capabilities manipulation to allow access to entity type admin |
1634 | 1634 | // page on WordPress versions before 4.7. |
1635 | 1635 | global $wp_version; |
1636 | - if ( version_compare( $wp_version, '4.7', '<' ) ) { |
|
1637 | - $that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 2 ); |
|
1636 | + if (version_compare($wp_version, '4.7', '<')) { |
|
1637 | + $that->loader->add_filter('map_meta_cap', $that->entity_type_admin_page, 'enable_admin_access_pre_47', 10, 2); |
|
1638 | 1638 | } |
1639 | 1639 | |
1640 | 1640 | /** Adapters. */ |
1641 | - $that->loader->add_filter( 'mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1 ); |
|
1641 | + $that->loader->add_filter('mce_external_plugins', $that->tinymce_adapter, 'mce_external_plugins', 10, 1); |
|
1642 | 1642 | /** |
1643 | 1643 | * Disabling Faq temporarily. |
1644 | 1644 | * Load the tinymce editor button on the tool bar. |
@@ -1649,14 +1649,14 @@ discard block |
||
1649 | 1649 | // $that->loader->add_filter( 'mce_buttons', $that->faq_tinymce_adapter, 'register_faq_toolbar_button', 10, 1 ); |
1650 | 1650 | // $that->loader->add_filter( 'mce_external_plugins', $that->faq_tinymce_adapter, 'register_faq_tinymce_plugin', 10, 1 ); |
1651 | 1651 | |
1652 | - $that->loader->add_action( 'wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create' ); |
|
1653 | - $that->loader->add_action( 'wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete' ); |
|
1652 | + $that->loader->add_action('wp_ajax_wl_sample_data_create', $that->sample_data_ajax_adapter, 'create'); |
|
1653 | + $that->loader->add_action('wp_ajax_wl_sample_data_delete', $that->sample_data_ajax_adapter, 'delete'); |
|
1654 | 1654 | |
1655 | 1655 | /** |
1656 | 1656 | * @since 3.26.0 |
1657 | 1657 | */ |
1658 | 1658 | $excerpt_adapter = new Post_Excerpt_Meta_Box_Adapter(); |
1659 | - $that->loader->add_action( 'do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box' ); |
|
1659 | + $that->loader->add_action('do_meta_boxes', $excerpt_adapter, 'replace_post_excerpt_meta_box'); |
|
1660 | 1660 | // Adding Rest route for the post excerpt |
1661 | 1661 | Post_Excerpt_Rest_Controller::register_routes(); |
1662 | 1662 | |
@@ -1677,14 +1677,14 @@ discard block |
||
1677 | 1677 | ); |
1678 | 1678 | |
1679 | 1679 | // Hooks to restrict multisite super admin from manipulating entity types. |
1680 | - if ( is_multisite() ) { |
|
1681 | - $that->loader->add_filter( 'map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 2 ); |
|
1680 | + if (is_multisite()) { |
|
1681 | + $that->loader->add_filter('map_meta_cap', $that->entity_type_admin_page, 'restrict_super_admin', 10, 2); |
|
1682 | 1682 | } |
1683 | 1683 | |
1684 | 1684 | $deactivator_feedback = new Wordlift_Deactivator_Feedback(); |
1685 | 1685 | |
1686 | - add_action( 'admin_footer', array( $deactivator_feedback, 'render_feedback_popup' ) ); |
|
1687 | - add_action( 'admin_enqueue_scripts', array( $deactivator_feedback, 'enqueue_popup_scripts' ) ); |
|
1686 | + add_action('admin_footer', array($deactivator_feedback, 'render_feedback_popup')); |
|
1687 | + add_action('admin_enqueue_scripts', array($deactivator_feedback, 'enqueue_popup_scripts')); |
|
1688 | 1688 | add_action( |
1689 | 1689 | 'wp_ajax_wl_deactivation_feedback', |
1690 | 1690 | array( |
@@ -1700,13 +1700,13 @@ discard block |
||
1700 | 1700 | */ |
1701 | 1701 | add_filter( |
1702 | 1702 | 'allowed_block_types', |
1703 | - function ( $value ) { |
|
1703 | + function($value) { |
|
1704 | 1704 | |
1705 | - if ( true === $value ) { |
|
1705 | + if (true === $value) { |
|
1706 | 1706 | return $value; |
1707 | 1707 | } |
1708 | 1708 | |
1709 | - return array_merge( (array) $value, array( 'wordlift/classification' ) ); |
|
1709 | + return array_merge((array) $value, array('wordlift/classification')); |
|
1710 | 1710 | }, |
1711 | 1711 | PHP_INT_MAX |
1712 | 1712 | ); |
@@ -1719,14 +1719,14 @@ discard block |
||
1719 | 1719 | |
1720 | 1720 | add_action( |
1721 | 1721 | 'admin_notices', |
1722 | - function () { |
|
1723 | - if ( apply_filters( 'wl_feature__enable__notices', true ) ) { |
|
1722 | + function() { |
|
1723 | + if (apply_filters('wl_feature__enable__notices', true)) { |
|
1724 | 1724 | /** |
1725 | 1725 | * Fired when the notice feature is enabled. |
1726 | 1726 | * |
1727 | 1727 | * @since 3.40.4 |
1728 | 1728 | */ |
1729 | - do_action( 'wordlift_admin_notices' ); |
|
1729 | + do_action('wordlift_admin_notices'); |
|
1730 | 1730 | } |
1731 | 1731 | } |
1732 | 1732 | ); |
@@ -1734,9 +1734,9 @@ discard block |
||
1734 | 1734 | |
1735 | 1735 | add_action( |
1736 | 1736 | 'admin_init', |
1737 | - function () { |
|
1737 | + function() { |
|
1738 | 1738 | // Only show the notice when the key is set or skipped. |
1739 | - if ( \Wordlift_Configuration_Service::get_instance()->get_key() && ! \Wordlift_Configuration_Service::get_instance()->get_skip_installation_notice() ) { |
|
1739 | + if (\Wordlift_Configuration_Service::get_instance()->get_key() && ! \Wordlift_Configuration_Service::get_instance()->get_skip_installation_notice()) { |
|
1740 | 1740 | $installation_complete_notice = new Installation_Complete_Notice(); |
1741 | 1741 | $installation_complete_notice->init(); |
1742 | 1742 | } |
@@ -1752,57 +1752,57 @@ discard block |
||
1752 | 1752 | * @since 1.0.0 |
1753 | 1753 | * @access private |
1754 | 1754 | */ |
1755 | - private function define_public_hooks( $that ) { |
|
1755 | + private function define_public_hooks($that) { |
|
1756 | 1756 | |
1757 | - $plugin_public = new Wordlift_Public( $that->get_plugin_name(), $that->get_version() ); |
|
1757 | + $plugin_public = new Wordlift_Public($that->get_plugin_name(), $that->get_version()); |
|
1758 | 1758 | |
1759 | 1759 | // Register the entity post type. |
1760 | - $that->loader->add_action( 'init', $that->entity_post_type_service, 'register' ); |
|
1760 | + $that->loader->add_action('init', $that->entity_post_type_service, 'register'); |
|
1761 | 1761 | |
1762 | 1762 | // Bind the link generation and handling hooks to the entity link service. |
1763 | - $that->loader->add_filter( 'post_type_link', $that->entity_link_service, 'post_type_link', 10, 2 ); |
|
1764 | - $that->loader->add_action( 'pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1 ); |
|
1763 | + $that->loader->add_filter('post_type_link', $that->entity_link_service, 'post_type_link', 10, 2); |
|
1764 | + $that->loader->add_action('pre_get_posts', $that->entity_link_service, 'pre_get_posts', PHP_INT_MAX, 1); |
|
1765 | 1765 | |
1766 | - $that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' ); |
|
1767 | - $that->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' ); |
|
1768 | - $that->loader->add_action( 'wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts' ); |
|
1766 | + $that->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_styles'); |
|
1767 | + $that->loader->add_action('wp_enqueue_scripts', $plugin_public, 'enqueue_scripts'); |
|
1768 | + $that->loader->add_action('wp_enqueue_scripts', $that->context_cards_service, 'enqueue_scripts'); |
|
1769 | 1769 | |
1770 | 1770 | // Registering Faq_Content_Filter service used for removing faq question and answer tags from the html. |
1771 | - $that->loader->add_filter( 'the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags' ); |
|
1771 | + $that->loader->add_filter('the_content', $that->faq_content_filter_service, 'remove_all_faq_question_and_answer_tags'); |
|
1772 | 1772 | // Hook the content filter service to add entity links. |
1773 | - if ( ! defined( 'WL_DISABLE_CONTENT_FILTER' ) || ! WL_DISABLE_CONTENT_FILTER ) { |
|
1773 | + if ( ! defined('WL_DISABLE_CONTENT_FILTER') || ! WL_DISABLE_CONTENT_FILTER) { |
|
1774 | 1774 | // We run before other filters. |
1775 | - $that->loader->add_filter( 'the_content', $that->content_filter_service, 'the_content', 9 ); |
|
1775 | + $that->loader->add_filter('the_content', $that->content_filter_service, 'the_content', 9); |
|
1776 | 1776 | } |
1777 | 1777 | |
1778 | 1778 | // Hook the AJAX wl_timeline action to the Timeline service. |
1779 | - $that->loader->add_action( 'wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline' ); |
|
1779 | + $that->loader->add_action('wp_ajax_nopriv_wl_timeline', $that->timeline_service, 'ajax_timeline'); |
|
1780 | 1780 | |
1781 | 1781 | // Hook the ShareThis service. |
1782 | - $that->loader->add_filter( 'the_content', $that->sharethis_service, 'the_content', 99 ); |
|
1783 | - $that->loader->add_filter( 'the_excerpt', $that->sharethis_service, 'the_excerpt', 99 ); |
|
1782 | + $that->loader->add_filter('the_content', $that->sharethis_service, 'the_content', 99); |
|
1783 | + $that->loader->add_filter('the_excerpt', $that->sharethis_service, 'the_excerpt', 99); |
|
1784 | 1784 | |
1785 | 1785 | // Hook the AJAX wl_jsonld action to the JSON-LD service. |
1786 | - $that->loader->add_action( 'wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get' ); |
|
1786 | + $that->loader->add_action('wp_ajax_nopriv_wl_jsonld', $that->jsonld_service, 'get'); |
|
1787 | 1787 | |
1788 | 1788 | // Hook the `pre_get_posts` action to the `Wordlift_Category_Taxonomy_Service` |
1789 | 1789 | // in order to tweak WP's `WP_Query` to include entities in queries related |
1790 | 1790 | // to categories. |
1791 | - $that->loader->add_action( 'pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1 ); |
|
1791 | + $that->loader->add_action('pre_get_posts', $that->category_taxonomy_service, 'pre_get_posts', 10, 1); |
|
1792 | 1792 | |
1793 | 1793 | /* |
1794 | 1794 | * Hook the `pre_get_posts` action to the `Wordlift_Entity_Page_Service` |
1795 | 1795 | * in order to tweak WP's `WP_Query` to show event related entities in reverse |
1796 | 1796 | * order of start time. |
1797 | 1797 | */ |
1798 | - $that->loader->add_action( 'pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1 ); |
|
1798 | + $that->loader->add_action('pre_get_posts', $that->entity_page_service, 'pre_get_posts', 10, 1); |
|
1799 | 1799 | |
1800 | 1800 | // This hook have to run before the rating service, as otherwise the post might not be a proper entity when rating is done. |
1801 | - $that->loader->add_action( 'save_post', $that->entity_type_adapter, 'save_post', 9, 2 ); |
|
1801 | + $that->loader->add_action('save_post', $that->entity_type_adapter, 'save_post', 9, 2); |
|
1802 | 1802 | |
1803 | 1803 | // Analytics Script Frontend. |
1804 | - if ( apply_filters( 'wl_feature__enable__analytics', true ) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable() ) { |
|
1805 | - $that->loader->add_action( 'wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10 ); |
|
1804 | + if (apply_filters('wl_feature__enable__analytics', true) && Wordlift_Configuration_Service::get_instance()->is_analytics_enable()) { |
|
1805 | + $that->loader->add_action('wp_enqueue_scripts', $that->analytics_connect, 'enqueue_scripts', 10); |
|
1806 | 1806 | } |
1807 | 1807 | |
1808 | 1808 | } |
@@ -1867,7 +1867,7 @@ discard block |
||
1867 | 1867 | * @since 3.27.6 |
1868 | 1868 | */ |
1869 | 1869 | // phpcs:ignore WordPress.WP.EnqueuedResourceParameters.NotInFooter,WordPress.WP.EnqueuedResourceParameters.MissingVersion |
1870 | - wp_register_script( 'wl_enabled_blocks', false ); |
|
1870 | + wp_register_script('wl_enabled_blocks', false); |
|
1871 | 1871 | |
1872 | 1872 | $enabled_blocks = array(); |
1873 | 1873 | |
@@ -1877,11 +1877,11 @@ discard block |
||
1877 | 1877 | * @since 3.32.3 |
1878 | 1878 | */ |
1879 | 1879 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1880 | - if ( apply_filters( 'wl_feature__enable__product-navigator', true ) ) { |
|
1880 | + if (apply_filters('wl_feature__enable__product-navigator', true)) { |
|
1881 | 1881 | $enabled_blocks[] = 'wordlift/products-navigator'; |
1882 | 1882 | } |
1883 | 1883 | |
1884 | - if ( apply_filters( 'wl_feature__enable__blocks', true ) ) { |
|
1884 | + if (apply_filters('wl_feature__enable__blocks', true)) { |
|
1885 | 1885 | // To intimate JS |
1886 | 1886 | $enabled_blocks = array_merge( |
1887 | 1887 | $enabled_blocks, |
@@ -1897,8 +1897,8 @@ discard block |
||
1897 | 1897 | ); |
1898 | 1898 | } |
1899 | 1899 | |
1900 | - wp_localize_script( 'wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks ); |
|
1901 | - wp_enqueue_script( 'wl_enabled_blocks' ); |
|
1900 | + wp_localize_script('wl_enabled_blocks', 'wlEnabledBlocks', $enabled_blocks); |
|
1901 | + wp_enqueue_script('wl_enabled_blocks'); |
|
1902 | 1902 | } |
1903 | 1903 | |
1904 | 1904 | /** |
@@ -1907,13 +1907,13 @@ discard block |
||
1907 | 1907 | public function register_screens() { |
1908 | 1908 | // Hook the menu to the Download Your Data page. |
1909 | 1909 | // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
1910 | - if ( apply_filters( 'wl_feature__enable__settings-download', true ) ) { |
|
1911 | - Assertions::is_set( $this->download_your_data_page, "`download_your_data_page` can't be null" ); |
|
1912 | - add_action( 'admin_menu', array( $this->download_your_data_page, 'admin_menu' ), 100, 0 ); |
|
1910 | + if (apply_filters('wl_feature__enable__settings-download', true)) { |
|
1911 | + Assertions::is_set($this->download_your_data_page, "`download_your_data_page` can't be null"); |
|
1912 | + add_action('admin_menu', array($this->download_your_data_page, 'admin_menu'), 100, 0); |
|
1913 | 1913 | } |
1914 | 1914 | |
1915 | - Assertions::is_set( $this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null" ); |
|
1916 | - add_action( 'admin_menu', array( $this->entity_type_settings_admin_page, 'admin_menu' ), 100, 0 ); |
|
1915 | + Assertions::is_set($this->entity_type_settings_admin_page, "`entity_type_settings_admin_page` can't be null"); |
|
1916 | + add_action('admin_menu', array($this->entity_type_settings_admin_page, 'admin_menu'), 100, 0); |
|
1917 | 1917 | |
1918 | 1918 | } |
1919 | 1919 |
@@ -10,18 +10,18 @@ discard block |
||
10 | 10 | |
11 | 11 | add_action( |
12 | 12 | 'wordlift_admin_notices', |
13 | - function () { |
|
14 | - if ( \Wordlift_Configuration_Service::get_instance()->get_skip_installation_notice() ) { |
|
13 | + function() { |
|
14 | + if (\Wordlift_Configuration_Service::get_instance()->get_skip_installation_notice()) { |
|
15 | 15 | return; |
16 | 16 | } |
17 | 17 | ?> |
18 | 18 | <div class="updated"> |
19 | - <H3><?php echo esc_html( get_plugin_data( WORDLIFT_PLUGIN_FILE )['Name'] ); ?> <?php esc_html_e( 'has been successfully installed on your site!', 'wordlift' ); ?></H3> |
|
20 | - <p><?php esc_html_e( 'we\'re now automatically enriching the structured data on your posts to create the best representation of your content that search engines will understand. Time to look forward to an increase in organic traffic!', 'wordlift' ); ?></p> |
|
19 | + <H3><?php echo esc_html(get_plugin_data(WORDLIFT_PLUGIN_FILE)['Name']); ?> <?php esc_html_e('has been successfully installed on your site!', 'wordlift'); ?></H3> |
|
20 | + <p><?php esc_html_e('we\'re now automatically enriching the structured data on your posts to create the best representation of your content that search engines will understand. Time to look forward to an increase in organic traffic!', 'wordlift'); ?></p> |
|
21 | 21 | <p><u> |
22 | 22 | <a |
23 | - href="<?php echo esc_url( wp_nonce_url( add_query_arg( 'wl_hide_installation_notice', true ), 'wordlift_hide_installation_notice_nonce', '_wl_hide_installation_notice_nonce' ) ); ?>"> |
|
24 | - <?php esc_html_e( 'Dismiss', 'wordlift' ); ?> |
|
23 | + href="<?php echo esc_url(wp_nonce_url(add_query_arg('wl_hide_installation_notice', true), 'wordlift_hide_installation_notice_nonce', '_wl_hide_installation_notice_nonce')); ?>"> |
|
24 | + <?php esc_html_e('Dismiss', 'wordlift'); ?> |
|
25 | 25 | </a> |
26 | 26 | </u> |
27 | 27 | </p> |
@@ -33,16 +33,16 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | public function handle_notice_close() { |
36 | - if ( ! isset( $_GET['wl_hide_installation_notice'] ) || ! isset( $_GET['_wl_hide_installation_notice_nonce'] ) ) { |
|
36 | + if ( ! isset($_GET['wl_hide_installation_notice']) || ! isset($_GET['_wl_hide_installation_notice_nonce'])) { |
|
37 | 37 | return; |
38 | 38 | } |
39 | 39 | |
40 | - if ( ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wl_hide_installation_notice_nonce'] ) ), 'wordlift_hide_installation_notice_nonce' ) |
|
41 | - || ! current_user_can( 'manage_options' ) ) { |
|
42 | - wp_die( esc_html__( 'Action failed.', 'wordlift' ) ); |
|
40 | + if ( ! wp_verify_nonce(sanitize_text_field(wp_unslash($_GET['_wl_hide_installation_notice_nonce'])), 'wordlift_hide_installation_notice_nonce') |
|
41 | + || ! current_user_can('manage_options')) { |
|
42 | + wp_die(esc_html__('Action failed.', 'wordlift')); |
|
43 | 43 | } |
44 | 44 | |
45 | - \Wordlift_Configuration_Service::get_instance()->set_skip_installation_notice( true ); |
|
45 | + \Wordlift_Configuration_Service::get_instance()->set_skip_installation_notice(true); |
|
46 | 46 | |
47 | 47 | } |
48 | 48 |
@@ -6,6 +6,6 @@ |
||
6 | 6 | $baseDir = dirname($vendorDir); |
7 | 7 | |
8 | 8 | return array( |
9 | - 'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php', |
|
10 | - 'Wordlift\\Modules\\Include_Exclude_Push_Config\\Include_Exclude_API' => $baseDir . '/Include_Exclude_API.php', |
|
9 | + 'Composer\\InstalledVersions' => $vendorDir.'/composer/InstalledVersions.php', |
|
10 | + 'Wordlift\\Modules\\Include_Exclude_Push_Config\\Include_Exclude_API' => $baseDir.'/Include_Exclude_API.php', |
|
11 | 11 | ); |
@@ -6,14 +6,14 @@ |
||
6 | 6 | |
7 | 7 | class ComposerStaticInit3d5ab0830c7bf52ba5addfd65f37fd54 |
8 | 8 | { |
9 | - public static $classMap = array ( |
|
10 | - 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
|
11 | - 'Wordlift\\Modules\\Include_Exclude_Push_Config\\Include_Exclude_API' => __DIR__ . '/../..' . '/Include_Exclude_API.php', |
|
9 | + public static $classMap = array( |
|
10 | + 'Composer\\InstalledVersions' => __DIR__.'/..'.'/composer/InstalledVersions.php', |
|
11 | + 'Wordlift\\Modules\\Include_Exclude_Push_Config\\Include_Exclude_API' => __DIR__.'/../..'.'/Include_Exclude_API.php', |
|
12 | 12 | ); |
13 | 13 | |
14 | 14 | public static function getInitializer(ClassLoader $loader) |
15 | 15 | { |
16 | - return \Closure::bind(function () use ($loader) { |
|
16 | + return \Closure::bind(function() use ($loader) { |
|
17 | 17 | $loader->classMap = ComposerStaticInit3d5ab0830c7bf52ba5addfd65f37fd54::$classMap; |
18 | 18 | |
19 | 19 | }, null, ClassLoader::class); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | */ |
114 | 114 | public function getPrefixes() |
115 | 115 | { |
116 | - if (!empty($this->prefixesPsr0)) { |
|
116 | + if ( ! empty($this->prefixesPsr0)) { |
|
117 | 117 | return call_user_func_array('array_merge', array_values($this->prefixesPsr0)); |
118 | 118 | } |
119 | 119 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | public function add($prefix, $paths, $prepend = false) |
185 | 185 | { |
186 | - if (!$prefix) { |
|
186 | + if ( ! $prefix) { |
|
187 | 187 | if ($prepend) { |
188 | 188 | $this->fallbackDirsPsr0 = array_merge( |
189 | 189 | (array) $paths, |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | } |
201 | 201 | |
202 | 202 | $first = $prefix[0]; |
203 | - if (!isset($this->prefixesPsr0[$first][$prefix])) { |
|
203 | + if ( ! isset($this->prefixesPsr0[$first][$prefix])) { |
|
204 | 204 | $this->prefixesPsr0[$first][$prefix] = (array) $paths; |
205 | 205 | |
206 | 206 | return; |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | */ |
233 | 233 | public function addPsr4($prefix, $paths, $prepend = false) |
234 | 234 | { |
235 | - if (!$prefix) { |
|
235 | + if ( ! $prefix) { |
|
236 | 236 | // Register directories for the root namespace. |
237 | 237 | if ($prepend) { |
238 | 238 | $this->fallbackDirsPsr4 = array_merge( |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | (array) $paths |
246 | 246 | ); |
247 | 247 | } |
248 | - } elseif (!isset($this->prefixDirsPsr4[$prefix])) { |
|
248 | + } elseif ( ! isset($this->prefixDirsPsr4[$prefix])) { |
|
249 | 249 | // Register directories for a new namespace. |
250 | 250 | $length = strlen($prefix); |
251 | 251 | if ('\\' !== $prefix[$length - 1]) { |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | */ |
280 | 280 | public function set($prefix, $paths) |
281 | 281 | { |
282 | - if (!$prefix) { |
|
282 | + if ( ! $prefix) { |
|
283 | 283 | $this->fallbackDirsPsr0 = (array) $paths; |
284 | 284 | } else { |
285 | 285 | $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; |
@@ -299,7 +299,7 @@ discard block |
||
299 | 299 | */ |
300 | 300 | public function setPsr4($prefix, $paths) |
301 | 301 | { |
302 | - if (!$prefix) { |
|
302 | + if ( ! $prefix) { |
|
303 | 303 | $this->fallbackDirsPsr4 = (array) $paths; |
304 | 304 | } else { |
305 | 305 | $length = strlen($prefix); |
@@ -493,18 +493,18 @@ discard block |
||
493 | 493 | private function findFileWithExtension($class, $ext) |
494 | 494 | { |
495 | 495 | // PSR-4 lookup |
496 | - $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; |
|
496 | + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext; |
|
497 | 497 | |
498 | 498 | $first = $class[0]; |
499 | 499 | if (isset($this->prefixLengthsPsr4[$first])) { |
500 | 500 | $subPath = $class; |
501 | 501 | while (false !== $lastPos = strrpos($subPath, '\\')) { |
502 | 502 | $subPath = substr($subPath, 0, $lastPos); |
503 | - $search = $subPath . '\\'; |
|
503 | + $search = $subPath.'\\'; |
|
504 | 504 | if (isset($this->prefixDirsPsr4[$search])) { |
505 | - $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); |
|
505 | + $pathEnd = DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $lastPos + 1); |
|
506 | 506 | foreach ($this->prefixDirsPsr4[$search] as $dir) { |
507 | - if (file_exists($file = $dir . $pathEnd)) { |
|
507 | + if (file_exists($file = $dir.$pathEnd)) { |
|
508 | 508 | return $file; |
509 | 509 | } |
510 | 510 | } |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | |
515 | 515 | // PSR-4 fallback dirs |
516 | 516 | foreach ($this->fallbackDirsPsr4 as $dir) { |
517 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { |
|
517 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) { |
|
518 | 518 | return $file; |
519 | 519 | } |
520 | 520 | } |
@@ -526,14 +526,14 @@ discard block |
||
526 | 526 | . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); |
527 | 527 | } else { |
528 | 528 | // PEAR-like class name |
529 | - $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; |
|
529 | + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext; |
|
530 | 530 | } |
531 | 531 | |
532 | 532 | if (isset($this->prefixesPsr0[$first])) { |
533 | 533 | foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { |
534 | 534 | if (0 === strpos($class, $prefix)) { |
535 | 535 | foreach ($dirs as $dir) { |
536 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
536 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
537 | 537 | return $file; |
538 | 538 | } |
539 | 539 | } |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | // PSR-0 fallback dirs |
545 | 545 | foreach ($this->fallbackDirsPsr0 as $dir) { |
546 | - if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { |
|
546 | + if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) { |
|
547 | 547 | return $file; |
548 | 548 | } |
549 | 549 | } |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | public static function loadClassLoader($class) |
10 | 10 | { |
11 | 11 | if ('Wordlift_Modules_Include_Exclude_Push_Config_Composer\Autoload\ClassLoader' === $class) { |
12 | - require __DIR__ . '/ClassLoader.php'; |
|
12 | + require __DIR__.'/ClassLoader.php'; |
|
13 | 13 | } |
14 | 14 | } |
15 | 15 | |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | self::$loader = $loader = new \Wordlift_Modules_Include_Exclude_Push_Config_Composer\Autoload\ClassLoader(\dirname(__DIR__)); |
27 | 27 | spl_autoload_unregister(array('ComposerAutoloaderInit3d5ab0830c7bf52ba5addfd65f37fd54', 'loadClassLoader')); |
28 | 28 | |
29 | - require __DIR__ . '/autoload_static.php'; |
|
29 | + require __DIR__.'/autoload_static.php'; |
|
30 | 30 | call_user_func(\Wordlift_Modules_Include_Exclude_Push_Config_Composer\Autoload\ComposerStaticInit3d5ab0830c7bf52ba5addfd65f37fd54::getInitializer($loader)); |
31 | 31 | |
32 | 32 | $loader->setClassMapAuthoritative(true); |