Completed
Pull Request — develop (#1596)
by David
01:36 queued 16s
created
src/modules/food-kg/includes/admin/Full_Page_Delegate.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 
5 5
 class Full_Page_Delegate implements Page_Delegate {
6 6
 
7
-	public function render() {
8
-		include WL_FOOD_KG_DIR_PATH . '/includes/admin/partials/main_ingredient.php';
9
-	}
7
+    public function render() {
8
+        include WL_FOOD_KG_DIR_PATH . '/includes/admin/partials/main_ingredient.php';
9
+    }
10 10
 
11
-	public function admin_enqueue_scripts() {
12
-		wp_enqueue_style( 'thickbox' );
13
-		wp_enqueue_script( 'plugin-install' );
14
-	}
11
+    public function admin_enqueue_scripts() {
12
+        wp_enqueue_style( 'thickbox' );
13
+        wp_enqueue_script( 'plugin-install' );
14
+    }
15 15
 
16 16
 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,12 +5,12 @@
 block discarded – undo
5 5
 class Full_Page_Delegate implements Page_Delegate {
6 6
 
7 7
 	public function render() {
8
-		include WL_FOOD_KG_DIR_PATH . '/includes/admin/partials/main_ingredient.php';
8
+		include WL_FOOD_KG_DIR_PATH.'/includes/admin/partials/main_ingredient.php';
9 9
 	}
10 10
 
11 11
 	public function admin_enqueue_scripts() {
12
-		wp_enqueue_style( 'thickbox' );
13
-		wp_enqueue_script( 'plugin-install' );
12
+		wp_enqueue_style('thickbox');
13
+		wp_enqueue_script('plugin-install');
14 14
 	}
15 15
 
16 16
 }
Please login to merge, or discard this patch.
src/modules/food-kg/includes/admin/Page.php 2 patches
Indentation   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -4,55 +4,55 @@
 block discarded – undo
4 4
 
5 5
 class Page {
6 6
 
7
-	/**
8
-	 * @var Page_Delegate
9
-	 */
10
-	private $delegate;
11
-
12
-	/**
13
-	 * @param Page_Delegate $full_page_delegate
14
-	 * @param Page_Delegate $modal_page_delegate
15
-	 */
16
-	public function __construct( $full_page_delegate, $modal_page_delegate ) {
17
-		$this->delegate = isset( $_GET['modal_window'] ) ? $modal_page_delegate : $full_page_delegate; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
18
-	}
19
-
20
-	public function register_hooks() {
21
-		add_action( 'admin_menu', array( $this, 'admin_menu' ) );
22
-		add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
23
-		if ( isset( $_GET['modal_window'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
24
-			add_action( 'in_admin_header', array( $this, 'remove_notices' ), 99 );
25
-		}
26
-	}
27
-
28
-	/**
29
-	 * Remove notices from ingredients modal.
30
-	 */
31
-	public function remove_notices() {
32
-		remove_all_actions( 'admin_notices' );
33
-		remove_all_actions( 'all_admin_notices' );
34
-	}
35
-
36
-	public function admin_menu() {
37
-		add_submenu_page(
38
-			'wl_admin_menu',
39
-			__( 'Ingredients', 'wordlift' ),
40
-			__( 'Ingredients', 'wordlift' ),
41
-			'manage_options',
42
-			'wl_ingredients',
43
-			array( $this, 'render' )
44
-		);
45
-	}
46
-
47
-	public function render() {
48
-		$this->delegate->render();
49
-	}
50
-
51
-	public function admin_enqueue_scripts() {
52
-		// Check that we are on the right screen
53
-		if ( get_current_screen()->id === 'wordlift_page_wl_ingredients' ) {
54
-			$this->delegate->admin_enqueue_scripts();
55
-		}
56
-	}
7
+    /**
8
+     * @var Page_Delegate
9
+     */
10
+    private $delegate;
11
+
12
+    /**
13
+     * @param Page_Delegate $full_page_delegate
14
+     * @param Page_Delegate $modal_page_delegate
15
+     */
16
+    public function __construct( $full_page_delegate, $modal_page_delegate ) {
17
+        $this->delegate = isset( $_GET['modal_window'] ) ? $modal_page_delegate : $full_page_delegate; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
18
+    }
19
+
20
+    public function register_hooks() {
21
+        add_action( 'admin_menu', array( $this, 'admin_menu' ) );
22
+        add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
23
+        if ( isset( $_GET['modal_window'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
24
+            add_action( 'in_admin_header', array( $this, 'remove_notices' ), 99 );
25
+        }
26
+    }
27
+
28
+    /**
29
+     * Remove notices from ingredients modal.
30
+     */
31
+    public function remove_notices() {
32
+        remove_all_actions( 'admin_notices' );
33
+        remove_all_actions( 'all_admin_notices' );
34
+    }
35
+
36
+    public function admin_menu() {
37
+        add_submenu_page(
38
+            'wl_admin_menu',
39
+            __( 'Ingredients', 'wordlift' ),
40
+            __( 'Ingredients', 'wordlift' ),
41
+            'manage_options',
42
+            'wl_ingredients',
43
+            array( $this, 'render' )
44
+        );
45
+    }
46
+
47
+    public function render() {
48
+        $this->delegate->render();
49
+    }
50
+
51
+    public function admin_enqueue_scripts() {
52
+        // Check that we are on the right screen
53
+        if ( get_current_screen()->id === 'wordlift_page_wl_ingredients' ) {
54
+            $this->delegate->admin_enqueue_scripts();
55
+        }
56
+    }
57 57
 
58 58
 }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,15 +13,15 @@  discard block
 block discarded – undo
13 13
 	 * @param Page_Delegate $full_page_delegate
14 14
 	 * @param Page_Delegate $modal_page_delegate
15 15
 	 */
16
-	public function __construct( $full_page_delegate, $modal_page_delegate ) {
17
-		$this->delegate = isset( $_GET['modal_window'] ) ? $modal_page_delegate : $full_page_delegate; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
16
+	public function __construct($full_page_delegate, $modal_page_delegate) {
17
+		$this->delegate = isset($_GET['modal_window']) ? $modal_page_delegate : $full_page_delegate; //phpcs:ignore WordPress.Security.NonceVerification.Recommended
18 18
 	}
19 19
 
20 20
 	public function register_hooks() {
21
-		add_action( 'admin_menu', array( $this, 'admin_menu' ) );
22
-		add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
23
-		if ( isset( $_GET['modal_window'] ) ) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
24
-			add_action( 'in_admin_header', array( $this, 'remove_notices' ), 99 );
21
+		add_action('admin_menu', array($this, 'admin_menu'));
22
+		add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
23
+		if (isset($_GET['modal_window'])) { //phpcs:ignore WordPress.Security.NonceVerification.Recommended
24
+			add_action('in_admin_header', array($this, 'remove_notices'), 99);
25 25
 		}
26 26
 	}
27 27
 
@@ -29,18 +29,18 @@  discard block
 block discarded – undo
29 29
 	 * Remove notices from ingredients modal.
30 30
 	 */
31 31
 	public function remove_notices() {
32
-		remove_all_actions( 'admin_notices' );
33
-		remove_all_actions( 'all_admin_notices' );
32
+		remove_all_actions('admin_notices');
33
+		remove_all_actions('all_admin_notices');
34 34
 	}
35 35
 
36 36
 	public function admin_menu() {
37 37
 		add_submenu_page(
38 38
 			'wl_admin_menu',
39
-			__( 'Ingredients', 'wordlift' ),
40
-			__( 'Ingredients', 'wordlift' ),
39
+			__('Ingredients', 'wordlift'),
40
+			__('Ingredients', 'wordlift'),
41 41
 			'manage_options',
42 42
 			'wl_ingredients',
43
-			array( $this, 'render' )
43
+			array($this, 'render')
44 44
 		);
45 45
 	}
46 46
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 	public function admin_enqueue_scripts() {
52 52
 		// Check that we are on the right screen
53
-		if ( get_current_screen()->id === 'wordlift_page_wl_ingredients' ) {
53
+		if (get_current_screen()->id === 'wordlift_page_wl_ingredients') {
54 54
 			$this->delegate->admin_enqueue_scripts();
55 55
 		}
56 56
 	}
Please login to merge, or discard this patch.
src/modules/food-kg/includes/admin/partials/main_ingredient.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
 	<hr class="wp-header-end">
12 12
 	<?php
13 13
 
14
-	// Prepare Table of elements
15
-	$main_ingredient_list_table = new Main_Ingredient_List_Table();
16
-	$main_ingredient_list_table->prepare_items();
17
-	$main_ingredient_list_table->display();
18
-	?>
14
+    // Prepare Table of elements
15
+    $main_ingredient_list_table = new Main_Ingredient_List_Table();
16
+    $main_ingredient_list_table->prepare_items();
17
+    $main_ingredient_list_table->display();
18
+    ?>
19 19
 </div>
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 
7 7
 
8 8
 <div class="wrap">
9
-	<h1 class="wp-heading-inline"><?php esc_html_e( 'Main Ingredients', 'wordlift' ); ?></h1>
10
-	<a href="<?php echo esc_url( admin_url( 'admin-ajax.php?action=wl_download_ingredients_data&_wpnonce=' . wp_create_nonce( 'wl-dl-ingredients-data-nonce' ) ) ); ?>" class="page-title-action"><?php esc_html_e( 'Download Ingredients Data', 'wordlift' ); ?></a>
9
+	<h1 class="wp-heading-inline"><?php esc_html_e('Main Ingredients', 'wordlift'); ?></h1>
10
+	<a href="<?php echo esc_url(admin_url('admin-ajax.php?action=wl_download_ingredients_data&_wpnonce='.wp_create_nonce('wl-dl-ingredients-data-nonce'))); ?>" class="page-title-action"><?php esc_html_e('Download Ingredients Data', 'wordlift'); ?></a>
11 11
 	<hr class="wp-header-end">
12 12
 	<?php
13 13
 
Please login to merge, or discard this patch.
src/modules/include-exclude/includes/admin/partials/field-0.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <p>
2
-	<input type="radio" id="wl_exclude_include_urls_settings_include_exclude_include" name="wl_exclude_include_urls_settings[include_exclude]" value="exclude" <?php checked( $options['include_exclude'], 'exclude', true ); // phpcs:ignore ?>>
3
-	<label for="wl_exclude_include_urls_settings_include_exclude_include"><?php echo esc_html__( 'Exclude', 'wordlift' ); ?></label>
2
+	<input type="radio" id="wl_exclude_include_urls_settings_include_exclude_include" name="wl_exclude_include_urls_settings[include_exclude]" value="exclude" <?php checked($options['include_exclude'], 'exclude', true); // phpcs:ignore ?>>
3
+	<label for="wl_exclude_include_urls_settings_include_exclude_include"><?php echo esc_html__('Exclude', 'wordlift'); ?></label>
4 4
 </p>
5 5
 <p>
6
-	<input type="radio" id="wl_exclude_include_urls_settings_include_exclude_exclude" name="wl_exclude_include_urls_settings[include_exclude]" value="include" <?php checked( $options['include_exclude'], 'include', true ); // phpcs:ignore ?>>
7
-	<label for="wl_exclude_include_urls_settings_include_exclude_exclude"><?php echo esc_html__( 'Include', 'wordlift' ); ?></label>
6
+	<input type="radio" id="wl_exclude_include_urls_settings_include_exclude_exclude" name="wl_exclude_include_urls_settings[include_exclude]" value="include" <?php checked($options['include_exclude'], 'include', true); // phpcs:ignore ?>>
7
+	<label for="wl_exclude_include_urls_settings_include_exclude_exclude"><?php echo esc_html__('Include', 'wordlift'); ?></label>
8 8
 </p>
Please login to merge, or discard this patch.
include-exclude/includes/admin/partials/exclude-include-urls-page.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@
 block discarded – undo
2 2
 	<h2><?php echo esc_html__( 'Exclude / Include URLs', 'wordlift' ); ?></h2>
3 3
 	<form action='options.php' method='post'>
4 4
 		<?php
5
-		settings_fields( 'wl_exclude_include_urls_settings_group' );
6
-		do_settings_sections( 'wl_exclude_include_urls_settings_page' );
7
-		submit_button();
8
-		?>
5
+        settings_fields( 'wl_exclude_include_urls_settings_group' );
6
+        do_settings_sections( 'wl_exclude_include_urls_settings_page' );
7
+        submit_button();
8
+        ?>
9 9
 	</form>
10 10
 </div>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@
 block discarded – undo
1 1
 <div class="wrap" id="wl-settings-page">
2
-	<h2><?php echo esc_html__( 'Exclude / Include URLs', 'wordlift' ); ?></h2>
2
+	<h2><?php echo esc_html__('Exclude / Include URLs', 'wordlift'); ?></h2>
3 3
 	<form action='options.php' method='post'>
4 4
 		<?php
5
-		settings_fields( 'wl_exclude_include_urls_settings_group' );
6
-		do_settings_sections( 'wl_exclude_include_urls_settings_page' );
5
+		settings_fields('wl_exclude_include_urls_settings_group');
6
+		do_settings_sections('wl_exclude_include_urls_settings_page');
7 7
 		submit_button();
8 8
 		?>
9 9
 	</form>
Please login to merge, or discard this patch.
src/modules/include-exclude/includes/admin/partials/field-1.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,12 +1,12 @@
 block discarded – undo
1 1
 <p>
2 2
 	<label for="wl_exclude_include_urls_settings_urls">
3 3
 		<?php
4
-		echo sprintf(
5
-			'%s <code>%s</code>',
6
-			esc_html__( 'One relative or absolute URL per line. Relative URLs will be converted to absolute in context of', 'wordlift' ),
7
-			esc_url( site_url() )
8
-		);
9
-		?>
4
+        echo sprintf(
5
+            '%s <code>%s</code>',
6
+            esc_html__( 'One relative or absolute URL per line. Relative URLs will be converted to absolute in context of', 'wordlift' ),
7
+            esc_url( site_url() )
8
+        );
9
+        ?>
10 10
 	</label>
11 11
 </p>
12 12
 <p>
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,12 +3,12 @@
 block discarded – undo
3 3
 		<?php
4 4
 		echo sprintf(
5 5
 			'%s <code>%s</code>',
6
-			esc_html__( 'One relative or absolute URL per line. Relative URLs will be converted to absolute in context of', 'wordlift' ),
7
-			esc_url( site_url() )
6
+			esc_html__('One relative or absolute URL per line. Relative URLs will be converted to absolute in context of', 'wordlift'),
7
+			esc_url(site_url())
8 8
 		);
9 9
 		?>
10 10
 	</label>
11 11
 </p>
12 12
 <p>
13
-	<textarea id="wl_exclude_include_urls_settings_urls" name='wl_exclude_include_urls_settings[urls]' class="large-text code" rows="10"><?php echo esc_textarea( $options['urls'] ); // phpcs:ignore ?></textarea>
13
+	<textarea id="wl_exclude_include_urls_settings_urls" name='wl_exclude_include_urls_settings[urls]' class="large-text code" rows="10"><?php echo esc_textarea($options['urls']); // phpcs:ignore ?></textarea>
14 14
 </p>
Please login to merge, or discard this patch.
src/wordlift.php 1 patch
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -32,24 +32,24 @@  discard block
 block discarded – undo
32 32
 use Wordlift\Post\Post_Adapter;
33 33
 
34 34
 // If this file is called directly, abort.
35
-if ( ! defined( 'WPINC' ) ) {
35
+if ( ! defined('WPINC')) {
36 36
 	die;
37 37
 }
38 38
 
39
-define( 'WORDLIFT_VERSION', '3.39.0-dev' );
40
-require_once __DIR__ . '/modules/common/load.php';
41
-require_once __DIR__ . '/modules/include-exclude/load.php';
39
+define('WORDLIFT_VERSION', '3.39.0-dev');
40
+require_once __DIR__.'/modules/common/load.php';
41
+require_once __DIR__.'/modules/include-exclude/load.php';
42 42
 
43 43
 /**
44 44
  * Filter to disable WLP on any request, defaults to true.
45 45
  *
46 46
  * @since 3.33.6
47 47
  */
48
-if ( ! apply_filters( 'wl_is_enabled', true ) ) {
48
+if ( ! apply_filters('wl_is_enabled', true)) {
49 49
 	return;
50 50
 }
51 51
 
52
-require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
52
+require_once plugin_dir_path(__FILE__).'vendor/autoload.php';
53 53
 
54 54
 /*
55 55
 	 * We introduce the WordLift autoloader, since we start using classes in namespaces, i.e. Wordlift\Http.
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 wordlift_plugin_autoload_register();
60 60
 
61 61
 // Include WordLift constants.
62
-require_once plugin_dir_path( __FILE__ ) . 'wordlift-constants.php';
62
+require_once plugin_dir_path(__FILE__).'wordlift-constants.php';
63 63
 
64 64
 // Load modules.
65
-require_once plugin_dir_path( __FILE__ ) . 'modules/core/wordlift-core.php';
65
+require_once plugin_dir_path(__FILE__).'modules/core/wordlift-core.php';
66 66
 
67
-require_once plugin_dir_path( __FILE__ ) . 'deprecations.php';
67
+require_once plugin_dir_path(__FILE__).'deprecations.php';
68 68
 
69 69
 // Load early to enable/disable features.
70
-require_once plugin_dir_path( __FILE__ ) . 'wordlift/features/index.php';
70
+require_once plugin_dir_path(__FILE__).'wordlift/features/index.php';
71 71
 
72 72
 /**
73 73
  * The code that runs during plugin activation.
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
  */
76 76
 function activate_wordlift() {
77 77
 
78
-	$log = Wordlift_Log_Service::get_logger( 'activate_wordlift' );
78
+	$log = Wordlift_Log_Service::get_logger('activate_wordlift');
79 79
 
80
-	$log->info( 'Activating WordLift...' );
80
+	$log->info('Activating WordLift...');
81 81
 
82
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
82
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-activator.php';
83 83
 	Wordlift_Activator::activate();
84 84
 
85 85
 	/**
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
  */
107 107
 function deactivate_wordlift() {
108 108
 
109
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
109
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-deactivator.php';
110 110
 	Wordlift_Deactivator::deactivate();
111 111
 	Wordlift_Http_Api::deactivate();
112 112
 	Ttl_Cache_Cleaner::deactivate();
@@ -124,14 +124,14 @@  discard block
 block discarded – undo
124 124
 
125 125
 }
126 126
 
127
-register_activation_hook( __FILE__, 'activate_wordlift' );
128
-register_deactivation_hook( __FILE__, 'deactivate_wordlift' );
127
+register_activation_hook(__FILE__, 'activate_wordlift');
128
+register_deactivation_hook(__FILE__, 'deactivate_wordlift');
129 129
 
130 130
 /**
131 131
  * The core plugin class that is used to define internationalization,
132 132
  * admin-specific hooks, and public-facing site hooks.
133 133
  */
134
-require plugin_dir_path( __FILE__ ) . 'includes/class-wordlift.php';
134
+require plugin_dir_path(__FILE__).'includes/class-wordlift.php';
135 135
 
136 136
 /**
137 137
  * Begins execution of the plugin.
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
 	 * @return bool
152 152
 	 * @since 3.27.6
153 153
 	 */
154
-	if ( apply_filters( 'wl_feature__enable__widgets', true ) ) {
155
-		add_action( 'widgets_init', 'wl_register_chord_widget' );
156
-		add_action( 'widgets_init', 'wl_register_geo_widget' );
157
-		add_action( 'widgets_init', 'wl_register_timeline_widget' );
154
+	if (apply_filters('wl_feature__enable__widgets', true)) {
155
+		add_action('widgets_init', 'wl_register_chord_widget');
156
+		add_action('widgets_init', 'wl_register_geo_widget');
157
+		add_action('widgets_init', 'wl_register_timeline_widget');
158 158
 	}
159
-	add_filter( 'widget_text', 'do_shortcode' );
159
+	add_filter('widget_text', 'do_shortcode');
160 160
 
161 161
 	/**
162 162
 	 * Filter: wl_feature__enable__analysis
@@ -166,10 +166,10 @@  discard block
 block discarded – undo
166 166
 	 * @return bool
167 167
 	 * @since 3.27.6
168 168
 	 */
169
-	if ( apply_filters( 'wl_feature__enable__analysis', true ) ) {
170
-		add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_action' );
169
+	if (apply_filters('wl_feature__enable__analysis', true)) {
170
+		add_action('wp_ajax_wl_analyze', 'wl_ajax_analyze_action');
171 171
 	} else {
172
-		add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_disabled_action' );
172
+		add_action('wp_ajax_wl_analyze', 'wl_ajax_analyze_disabled_action');
173 173
 	}
174 174
 
175 175
 	$plugin = new Wordlift();
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 	add_action(
188 188
 		'plugins_loaded',
189
-		function () {
189
+		function() {
190 190
 			// All features from registry should be initialized here.
191 191
 			$features_registry = Features_Registry::get_instance();
192 192
 			$features_registry->initialize_all_features();
@@ -197,27 +197,27 @@  discard block
 block discarded – undo
197 197
 	add_action(
198 198
 		'plugins_loaded',
199 199
 		// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
200
-		function () use ( $plugin ) {
200
+		function() use ($plugin) {
201 201
 
202 202
 			new Wordlift_Products_Navigator_Shortcode_REST();
203 203
 
204 204
 			// Register the Dataset module, requires `$api_service`.
205
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/dataset/index.php';
206
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/shipping-data/index.php';
205
+			require_once plugin_dir_path(__FILE__).'wordlift/dataset/index.php';
206
+			require_once plugin_dir_path(__FILE__).'wordlift/shipping-data/index.php';
207 207
 
208 208
 			/*
209 209
 			* Require the Entity annotation cleanup module.
210 210
 			*
211 211
 			* @since 3.34.6
212 212
 			*/
213
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/cleanup/index.php';
213
+			require_once plugin_dir_path(__FILE__).'wordlift/cleanup/index.php';
214 214
 
215 215
 			/*
216 216
 			* Import LOD entities.
217 217
 			*
218 218
 			* @since 3.35.0
219 219
 			*/
220
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/lod-import/index.php';
220
+			require_once plugin_dir_path(__FILE__).'wordlift/lod-import/index.php';
221 221
 
222 222
 		}
223 223
 	);
@@ -235,23 +235,23 @@  discard block
 block discarded – undo
235 235
 function wordlift_plugin_autoload_register() {
236 236
 
237 237
 	spl_autoload_register(
238
-		function ( $class_name ) {
238
+		function($class_name) {
239 239
 
240 240
 			// Bail out if these are not our classes.
241
-			if ( 0 !== strpos( $class_name, 'Wordlift\\' ) ) {
241
+			if (0 !== strpos($class_name, 'Wordlift\\')) {
242 242
 				return false;
243 243
 			}
244 244
 
245
-			$class_name_lc = strtolower( str_replace( '_', '-', $class_name ) );
245
+			$class_name_lc = strtolower(str_replace('_', '-', $class_name));
246 246
 
247
-			preg_match( '|^(?:(.*)\\\\)?(.+?)$|', $class_name_lc, $matches );
247
+			preg_match('|^(?:(.*)\\\\)?(.+?)$|', $class_name_lc, $matches);
248 248
 
249
-			$path = str_replace( '\\', DIRECTORY_SEPARATOR, $matches[1] );
250
-			$file = 'class-' . $matches[2] . '.php';
249
+			$path = str_replace('\\', DIRECTORY_SEPARATOR, $matches[1]);
250
+			$file = 'class-'.$matches[2].'.php';
251 251
 
252
-			$full_path = plugin_dir_path( __FILE__ ) . $path . DIRECTORY_SEPARATOR . $file;
252
+			$full_path = plugin_dir_path(__FILE__).$path.DIRECTORY_SEPARATOR.$file;
253 253
 
254
-			if ( ! file_exists( $full_path ) ) {
254
+			if ( ! file_exists($full_path)) {
255 255
 				return false;
256 256
 			}
257 257
 
@@ -263,13 +263,13 @@  discard block
 block discarded – undo
263 263
 
264 264
 }
265 265
 
266
-function wl_block_categories( $categories ) {
266
+function wl_block_categories($categories) {
267 267
 	return array_merge(
268 268
 		$categories,
269 269
 		array(
270 270
 			array(
271 271
 				'slug'  => 'wordlift',
272
-				'title' => __( 'WordLift', 'wordlift' ),
272
+				'title' => __('WordLift', 'wordlift'),
273 273
 			),
274 274
 		)
275 275
 	);
@@ -279,22 +279,22 @@  discard block
 block discarded – undo
279 279
  * This function is created temporarily to handle the legacy library,
280 280
  * this has to be removed when removing the legacy fields from the ui.
281 281
  */
282
-function wl_enqueue_leaflet( $in_footer = false ) {
282
+function wl_enqueue_leaflet($in_footer = false) {
283 283
 	// Leaflet.
284
-	wp_enqueue_style( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.css', array(), '1.6.0' );
285
-	wp_enqueue_script( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer );
284
+	wp_enqueue_style('wl-leaflet', plugin_dir_url(__FILE__).'js/leaflet/leaflet.css', array(), '1.6.0');
285
+	wp_enqueue_script('wl-leaflet', plugin_dir_url(__FILE__).'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer);
286 286
 }
287 287
 
288
-add_filter( 'block_categories', 'wl_block_categories', 10 );
288
+add_filter('block_categories', 'wl_block_categories', 10);
289 289
 
290 290
 // Temporary fix for a typo in WooCommerce Extension.
291 291
 add_filter(
292 292
 	'wl_feature__enable__dataset',
293
-	function ( $value ) {
294
-		return apply_filters( 'wl_features__enable__dataset', $value );
293
+	function($value) {
294
+		return apply_filters('wl_features__enable__dataset', $value);
295 295
 	}
296 296
 );
297 297
 
298
-require_once __DIR__ . '/modules/food-kg/load.php';
299
-require_once __DIR__ . '/modules/acf4so/load.php';
300
-require_once __DIR__ . '/modules/pods/load.php';
298
+require_once __DIR__.'/modules/food-kg/load.php';
299
+require_once __DIR__.'/modules/acf4so/load.php';
300
+require_once __DIR__.'/modules/pods/load.php';
Please login to merge, or discard this patch.
src/modules/include-exclude/includes/admin/Settings.php 2 patches
Indentation   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -14,89 +14,89 @@
 block discarded – undo
14 14
  */
15 15
 class Settings {
16 16
 
17
-	/**
18
-	 * Register hooks.
19
-	 */
20
-	public function register_hooks() {
21
-		if ( is_admin() ) {
22
-			add_action(
23
-				'plugins_loaded',
24
-				function () {
25
-					add_action( 'admin_menu', array( $this, 'register_sub_menu' ) );
26
-					add_action( 'admin_init', array( $this, 'register_setting' ) );
27
-				}
28
-			);
29
-		}
30
-	}
17
+    /**
18
+     * Register hooks.
19
+     */
20
+    public function register_hooks() {
21
+        if ( is_admin() ) {
22
+            add_action(
23
+                'plugins_loaded',
24
+                function () {
25
+                    add_action( 'admin_menu', array( $this, 'register_sub_menu' ) );
26
+                    add_action( 'admin_init', array( $this, 'register_setting' ) );
27
+                }
28
+            );
29
+        }
30
+    }
31 31
 
32
-	/**
33
-	 * Register submenu.
34
-	 */
35
-	public function register_sub_menu() {
36
-		add_submenu_page(
37
-			'wl_admin_menu',
38
-			__( 'Exclude Include URLs', 'wordlift' ),
39
-			__( 'Exclude Include URLs', 'wordlift' ),
40
-			'manage_options',
41
-			'wl_exclude_include_urls_menu',
42
-			array( $this, 'submenu_page_callback' )
43
-		);
44
-	}
32
+    /**
33
+     * Register submenu.
34
+     */
35
+    public function register_sub_menu() {
36
+        add_submenu_page(
37
+            'wl_admin_menu',
38
+            __( 'Exclude Include URLs', 'wordlift' ),
39
+            __( 'Exclude Include URLs', 'wordlift' ),
40
+            'manage_options',
41
+            'wl_exclude_include_urls_menu',
42
+            array( $this, 'submenu_page_callback' )
43
+        );
44
+    }
45 45
 
46
-	/**
47
-	 * Register settings.
48
-	 */
49
-	public function register_setting() {
50
-		register_setting( 'wl_exclude_include_urls_settings_group', 'wl_exclude_include_urls_settings' );
51
-		add_settings_section(
52
-			'wl_exclude_include_urls_settings_section_0',
53
-			__( 'URL filter type, list of URLs', 'wordlift' ),
54
-			array( $this, 'settings_section_callback' ),
55
-			'wl_exclude_include_urls_settings_page'
56
-		);
46
+    /**
47
+     * Register settings.
48
+     */
49
+    public function register_setting() {
50
+        register_setting( 'wl_exclude_include_urls_settings_group', 'wl_exclude_include_urls_settings' );
51
+        add_settings_section(
52
+            'wl_exclude_include_urls_settings_section_0',
53
+            __( 'URL filter type, list of URLs', 'wordlift' ),
54
+            array( $this, 'settings_section_callback' ),
55
+            'wl_exclude_include_urls_settings_page'
56
+        );
57 57
 
58
-		add_settings_field(
59
-			'wl_exclude_include_urls_field_0',
60
-			__( 'URLs filter type', 'wordlift' ),
61
-			array( $this, 'settings_field_0_render' ),
62
-			'wl_exclude_include_urls_settings_page',
63
-			'wl_exclude_include_urls_settings_section_0'
64
-		);
58
+        add_settings_field(
59
+            'wl_exclude_include_urls_field_0',
60
+            __( 'URLs filter type', 'wordlift' ),
61
+            array( $this, 'settings_field_0_render' ),
62
+            'wl_exclude_include_urls_settings_page',
63
+            'wl_exclude_include_urls_settings_section_0'
64
+        );
65 65
 
66
-		add_settings_field(
67
-			'wl_exclude_include_urls_field_1',
68
-			__( 'List of URLs', 'wordlift' ),
69
-			array( $this, 'settings_field_1_render' ),
70
-			'wl_exclude_include_urls_settings_page',
71
-			'wl_exclude_include_urls_settings_section_0'
72
-		);
73
-	}
66
+        add_settings_field(
67
+            'wl_exclude_include_urls_field_1',
68
+            __( 'List of URLs', 'wordlift' ),
69
+            array( $this, 'settings_field_1_render' ),
70
+            'wl_exclude_include_urls_settings_page',
71
+            'wl_exclude_include_urls_settings_section_0'
72
+        );
73
+    }
74 74
 
75
-	public function settings_section_callback() {
76
-		echo esc_html__( 'Select a URL filter type, and add list of URLs to selective active from WordLift\'s JSON-LD', 'wordlift' );
77
-	}
75
+    public function settings_section_callback() {
76
+        echo esc_html__( 'Select a URL filter type, and add list of URLs to selective active from WordLift\'s JSON-LD', 'wordlift' );
77
+    }
78 78
 
79
-	/**
80
-	 * Callback function for settings field rendering.
81
-	 */
82
-	public function settings_field_0_render() {
83
-		$options = get_option( 'wl_exclude_include_urls_settings' ); // phpcs:ignore
84
-		include plugin_dir_path( __FILE__ ) . 'partials/field-0.php';
85
-	}
79
+    /**
80
+     * Callback function for settings field rendering.
81
+     */
82
+    public function settings_field_0_render() {
83
+        $options = get_option( 'wl_exclude_include_urls_settings' ); // phpcs:ignore
84
+        include plugin_dir_path( __FILE__ ) . 'partials/field-0.php';
85
+    }
86 86
 
87
-	/**
88
-	 * Callback function for settings field rendering.
89
-	 */
90
-	public function settings_field_1_render() {
91
-		$options = get_option( 'wl_exclude_include_urls_settings' ); // phpcs:ignore
92
-		include plugin_dir_path( __FILE__ ) . 'partials/field-1.php';
93
-	}
87
+    /**
88
+     * Callback function for settings field rendering.
89
+     */
90
+    public function settings_field_1_render() {
91
+        $options = get_option( 'wl_exclude_include_urls_settings' ); // phpcs:ignore
92
+        include plugin_dir_path( __FILE__ ) . 'partials/field-1.php';
93
+    }
94 94
 
95
-	/**
96
-	 * Callback function for Exclude Include URLs submenu page.
97
-	 */
98
-	public function submenu_page_callback() {
99
-		include plugin_dir_path( __FILE__ ) . 'partials/exclude-include-urls-page.php';
100
-	}
95
+    /**
96
+     * Callback function for Exclude Include URLs submenu page.
97
+     */
98
+    public function submenu_page_callback() {
99
+        include plugin_dir_path( __FILE__ ) . 'partials/exclude-include-urls-page.php';
100
+    }
101 101
 
102 102
 }
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 	 * Register hooks.
19 19
 	 */
20 20
 	public function register_hooks() {
21
-		if ( is_admin() ) {
21
+		if (is_admin()) {
22 22
 			add_action(
23 23
 				'plugins_loaded',
24
-				function () {
25
-					add_action( 'admin_menu', array( $this, 'register_sub_menu' ) );
26
-					add_action( 'admin_init', array( $this, 'register_setting' ) );
24
+				function() {
25
+					add_action('admin_menu', array($this, 'register_sub_menu'));
26
+					add_action('admin_init', array($this, 'register_setting'));
27 27
 				}
28 28
 			);
29 29
 		}
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 	public function register_sub_menu() {
36 36
 		add_submenu_page(
37 37
 			'wl_admin_menu',
38
-			__( 'Exclude Include URLs', 'wordlift' ),
39
-			__( 'Exclude Include URLs', 'wordlift' ),
38
+			__('Exclude Include URLs', 'wordlift'),
39
+			__('Exclude Include URLs', 'wordlift'),
40 40
 			'manage_options',
41 41
 			'wl_exclude_include_urls_menu',
42
-			array( $this, 'submenu_page_callback' )
42
+			array($this, 'submenu_page_callback')
43 43
 		);
44 44
 	}
45 45
 
@@ -47,56 +47,56 @@  discard block
 block discarded – undo
47 47
 	 * Register settings.
48 48
 	 */
49 49
 	public function register_setting() {
50
-		register_setting( 'wl_exclude_include_urls_settings_group', 'wl_exclude_include_urls_settings' );
50
+		register_setting('wl_exclude_include_urls_settings_group', 'wl_exclude_include_urls_settings');
51 51
 		add_settings_section(
52 52
 			'wl_exclude_include_urls_settings_section_0',
53
-			__( 'URL filter type, list of URLs', 'wordlift' ),
54
-			array( $this, 'settings_section_callback' ),
53
+			__('URL filter type, list of URLs', 'wordlift'),
54
+			array($this, 'settings_section_callback'),
55 55
 			'wl_exclude_include_urls_settings_page'
56 56
 		);
57 57
 
58 58
 		add_settings_field(
59 59
 			'wl_exclude_include_urls_field_0',
60
-			__( 'URLs filter type', 'wordlift' ),
61
-			array( $this, 'settings_field_0_render' ),
60
+			__('URLs filter type', 'wordlift'),
61
+			array($this, 'settings_field_0_render'),
62 62
 			'wl_exclude_include_urls_settings_page',
63 63
 			'wl_exclude_include_urls_settings_section_0'
64 64
 		);
65 65
 
66 66
 		add_settings_field(
67 67
 			'wl_exclude_include_urls_field_1',
68
-			__( 'List of URLs', 'wordlift' ),
69
-			array( $this, 'settings_field_1_render' ),
68
+			__('List of URLs', 'wordlift'),
69
+			array($this, 'settings_field_1_render'),
70 70
 			'wl_exclude_include_urls_settings_page',
71 71
 			'wl_exclude_include_urls_settings_section_0'
72 72
 		);
73 73
 	}
74 74
 
75 75
 	public function settings_section_callback() {
76
-		echo esc_html__( 'Select a URL filter type, and add list of URLs to selective active from WordLift\'s JSON-LD', 'wordlift' );
76
+		echo esc_html__('Select a URL filter type, and add list of URLs to selective active from WordLift\'s JSON-LD', 'wordlift');
77 77
 	}
78 78
 
79 79
 	/**
80 80
 	 * Callback function for settings field rendering.
81 81
 	 */
82 82
 	public function settings_field_0_render() {
83
-		$options = get_option( 'wl_exclude_include_urls_settings' ); // phpcs:ignore
84
-		include plugin_dir_path( __FILE__ ) . 'partials/field-0.php';
83
+		$options = get_option('wl_exclude_include_urls_settings'); // phpcs:ignore
84
+		include plugin_dir_path(__FILE__).'partials/field-0.php';
85 85
 	}
86 86
 
87 87
 	/**
88 88
 	 * Callback function for settings field rendering.
89 89
 	 */
90 90
 	public function settings_field_1_render() {
91
-		$options = get_option( 'wl_exclude_include_urls_settings' ); // phpcs:ignore
92
-		include plugin_dir_path( __FILE__ ) . 'partials/field-1.php';
91
+		$options = get_option('wl_exclude_include_urls_settings'); // phpcs:ignore
92
+		include plugin_dir_path(__FILE__).'partials/field-1.php';
93 93
 	}
94 94
 
95 95
 	/**
96 96
 	 * Callback function for Exclude Include URLs submenu page.
97 97
 	 */
98 98
 	public function submenu_page_callback() {
99
-		include plugin_dir_path( __FILE__ ) . 'partials/exclude-include-urls-page.php';
99
+		include plugin_dir_path(__FILE__).'partials/exclude-include-urls-page.php';
100 100
 	}
101 101
 
102 102
 }
Please login to merge, or discard this patch.
src/modules/include-exclude/vendor/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,6 +7,6 @@
 block discarded – undo
7 7
     exit(1);
8 8
 }
9 9
 
10
-require_once __DIR__ . '/composer/autoload_real.php';
10
+require_once __DIR__.'/composer/autoload_real.php';
11 11
 
12 12
 return ComposerAutoloaderInitea9f09a268eac98657b6e4638a5b4856::getLoader();
Please login to merge, or discard this patch.