@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | use Wordlift\Modules\Common\Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
| 14 | 14 | |
| 15 | 15 | if ( ! defined( 'ABSPATH' ) ) { |
| 16 | - exit; |
|
| 16 | + exit; |
|
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /** |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | $wl_features = get_option( '_wl_features', array() ); |
| 24 | 24 | if ( ! apply_filters( 'wl_feature__enable__include-exclude', isset( $wl_features['include-exclude'] ) && $wl_features['include-exclude'] ) ) { // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
| 25 | - return; |
|
| 25 | + return; |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -32,26 +32,26 @@ discard block |
||
| 32 | 32 | */ |
| 33 | 33 | function __wl_include_exclude__load() { |
| 34 | 34 | |
| 35 | - // Autoloader for plugin itself. |
|
| 36 | - if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { |
|
| 37 | - require_once __DIR__ . '/vendor/autoload.php'; |
|
| 38 | - } |
|
| 35 | + // Autoloader for plugin itself. |
|
| 36 | + if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { |
|
| 37 | + require_once __DIR__ . '/vendor/autoload.php'; |
|
| 38 | + } |
|
| 39 | 39 | |
| 40 | - $container_builder = new ContainerBuilder(); |
|
| 41 | - $loader = new YamlFileLoader( $container_builder, new FileLocator( __DIR__ ) ); |
|
| 42 | - $loader->load( 'services.yml' ); |
|
| 43 | - $container_builder->compile(); |
|
| 40 | + $container_builder = new ContainerBuilder(); |
|
| 41 | + $loader = new YamlFileLoader( $container_builder, new FileLocator( __DIR__ ) ); |
|
| 42 | + $loader->load( 'services.yml' ); |
|
| 43 | + $container_builder->compile(); |
|
| 44 | 44 | |
| 45 | - $enabled = $container_builder->get( 'Wordlift\Modules\Include_Exclude\Plugin_Enabled' ); |
|
| 46 | - $enabled->register_hooks(); |
|
| 45 | + $enabled = $container_builder->get( 'Wordlift\Modules\Include_Exclude\Plugin_Enabled' ); |
|
| 46 | + $enabled->register_hooks(); |
|
| 47 | 47 | |
| 48 | - if ( apply_filters( 'wl_is_enabled', true ) ) { |
|
| 49 | - $settings = $container_builder->get( 'Wordlift\Modules\Include_Exclude\Admin\Settings' ); |
|
| 50 | - $settings->register_hooks(); |
|
| 48 | + if ( apply_filters( 'wl_is_enabled', true ) ) { |
|
| 49 | + $settings = $container_builder->get( 'Wordlift\Modules\Include_Exclude\Admin\Settings' ); |
|
| 50 | + $settings->register_hooks(); |
|
| 51 | 51 | |
| 52 | - $api = $container_builder->get( 'Wordlift\Modules\Include_Exclude\API' ); |
|
| 53 | - $api->register_hooks(); |
|
| 54 | - } |
|
| 52 | + $api = $container_builder->get( 'Wordlift\Modules\Include_Exclude\API' ); |
|
| 53 | + $api->register_hooks(); |
|
| 54 | + } |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | __wl_include_exclude__load(); |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | use Wordlift\Modules\Common\Symfony\Component\DependencyInjection\ContainerBuilder; |
| 13 | 13 | use Wordlift\Modules\Common\Symfony\Component\DependencyInjection\Loader\YamlFileLoader; |
| 14 | 14 | |
| 15 | -if ( ! defined( 'ABSPATH' ) ) { |
|
| 15 | +if ( ! defined('ABSPATH')) { |
|
| 16 | 16 | exit; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | * This module loads very early since it needs to tell WLP whether to load itself or not. Therefore we need to load the |
| 21 | 21 | * feature settings by ourselves. |
| 22 | 22 | */ |
| 23 | -$wl_features = get_option( '_wl_features', array() ); |
|
| 24 | -if ( ! apply_filters( 'wl_feature__enable__include-exclude', isset( $wl_features['include-exclude'] ) && $wl_features['include-exclude'] ) ) { // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
|
| 23 | +$wl_features = get_option('_wl_features', array()); |
|
| 24 | +if ( ! apply_filters('wl_feature__enable__include-exclude', isset($wl_features['include-exclude']) && $wl_features['include-exclude'])) { // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores |
|
| 25 | 25 | return; |
| 26 | 26 | } |
| 27 | 27 | |
@@ -33,23 +33,23 @@ discard block |
||
| 33 | 33 | function __wl_include_exclude__load() { |
| 34 | 34 | |
| 35 | 35 | // Autoloader for plugin itself. |
| 36 | - if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { |
|
| 37 | - require_once __DIR__ . '/vendor/autoload.php'; |
|
| 36 | + if (file_exists(__DIR__.'/vendor/autoload.php')) { |
|
| 37 | + require_once __DIR__.'/vendor/autoload.php'; |
|
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | $container_builder = new ContainerBuilder(); |
| 41 | - $loader = new YamlFileLoader( $container_builder, new FileLocator( __DIR__ ) ); |
|
| 42 | - $loader->load( 'services.yml' ); |
|
| 41 | + $loader = new YamlFileLoader($container_builder, new FileLocator(__DIR__)); |
|
| 42 | + $loader->load('services.yml'); |
|
| 43 | 43 | $container_builder->compile(); |
| 44 | 44 | |
| 45 | - $enabled = $container_builder->get( 'Wordlift\Modules\Include_Exclude\Plugin_Enabled' ); |
|
| 45 | + $enabled = $container_builder->get('Wordlift\Modules\Include_Exclude\Plugin_Enabled'); |
|
| 46 | 46 | $enabled->register_hooks(); |
| 47 | 47 | |
| 48 | - if ( apply_filters( 'wl_is_enabled', true ) ) { |
|
| 49 | - $settings = $container_builder->get( 'Wordlift\Modules\Include_Exclude\Admin\Settings' ); |
|
| 48 | + if (apply_filters('wl_is_enabled', true)) { |
|
| 49 | + $settings = $container_builder->get('Wordlift\Modules\Include_Exclude\Admin\Settings'); |
|
| 50 | 50 | $settings->register_hooks(); |
| 51 | 51 | |
| 52 | - $api = $container_builder->get( 'Wordlift\Modules\Include_Exclude\API' ); |
|
| 52 | + $api = $container_builder->get('Wordlift\Modules\Include_Exclude\API'); |
|
| 53 | 53 | $api->register_hooks(); |
| 54 | 54 | } |
| 55 | 55 | } |