Completed
Push — develop ( 184494...d87d96 )
by David
01:17 queued 15s
created
src/wordlift.php 2 patches
Indentation   +142 added lines, -142 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 
34 34
 // If this file is called directly, abort.
35 35
 if ( ! defined( 'WPINC' ) ) {
36
-	die;
36
+    die;
37 37
 }
38 38
 
39 39
 define( 'WORDLIFT_VERSION', '3.39.0-dev' );
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
  * @since 3.33.6
45 45
  */
46 46
 if ( ! apply_filters( 'wl_is_enabled', true ) ) {
47
-	return;
47
+    return;
48 48
 }
49 49
 
50 50
 require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
@@ -73,29 +73,29 @@  discard block
 block discarded – undo
73 73
  */
74 74
 function activate_wordlift() {
75 75
 
76
-	$log = Wordlift_Log_Service::get_logger( 'activate_wordlift' );
77
-
78
-	$log->info( 'Activating WordLift...' );
79
-
80
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
81
-	Wordlift_Activator::activate();
82
-
83
-	/**
84
-	 * Tell the {@link Wordlift_Http_Api} class that we're activating, to let it run activation tasks.
85
-	 *
86
-	 * @see https://github.com/insideout10/wordlift-plugin/issues/820 related issue.
87
-	 * @since 3.19.2
88
-	 */
89
-	Wordlift_Http_Api::activate();
90
-
91
-	// Ensure the post type is registered before flushing the rewrite rules.
92
-	Wordlift_Entity_Post_Type_Service::get_instance()->register();
93
-	flush_rewrite_rules();
94
-	/**
95
-	 * @since 3.27.7
96
-	 * @see https://github.com/insideout10/wordlift-plugin/issues/1214
97
-	 */
98
-	Top_Entities::activate();
76
+    $log = Wordlift_Log_Service::get_logger( 'activate_wordlift' );
77
+
78
+    $log->info( 'Activating WordLift...' );
79
+
80
+    require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
81
+    Wordlift_Activator::activate();
82
+
83
+    /**
84
+     * Tell the {@link Wordlift_Http_Api} class that we're activating, to let it run activation tasks.
85
+     *
86
+     * @see https://github.com/insideout10/wordlift-plugin/issues/820 related issue.
87
+     * @since 3.19.2
88
+     */
89
+    Wordlift_Http_Api::activate();
90
+
91
+    // Ensure the post type is registered before flushing the rewrite rules.
92
+    Wordlift_Entity_Post_Type_Service::get_instance()->register();
93
+    flush_rewrite_rules();
94
+    /**
95
+     * @since 3.27.7
96
+     * @see https://github.com/insideout10/wordlift-plugin/issues/1214
97
+     */
98
+    Top_Entities::activate();
99 99
 }
100 100
 
101 101
 /**
@@ -104,21 +104,21 @@  discard block
 block discarded – undo
104 104
  */
105 105
 function deactivate_wordlift() {
106 106
 
107
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
108
-	Wordlift_Deactivator::deactivate();
109
-	Wordlift_Http_Api::deactivate();
110
-	Ttl_Cache_Cleaner::deactivate();
111
-	/**
112
-	 * @since 3.27.7
113
-	 * @see https://github.com/insideout10/wordlift-plugin/issues/1214
114
-	 */
115
-	Top_Entities::deactivate();
116
-	/**
117
-	 * @since 3.27.8
118
-	 * Remove notification flag on deactivation.
119
-	 */
120
-	Key_Validation_Notice::remove_notification_flag();
121
-	flush_rewrite_rules();
107
+    require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
108
+    Wordlift_Deactivator::deactivate();
109
+    Wordlift_Http_Api::deactivate();
110
+    Ttl_Cache_Cleaner::deactivate();
111
+    /**
112
+     * @since 3.27.7
113
+     * @see https://github.com/insideout10/wordlift-plugin/issues/1214
114
+     */
115
+    Top_Entities::deactivate();
116
+    /**
117
+     * @since 3.27.8
118
+     * Remove notification flag on deactivation.
119
+     */
120
+    Key_Validation_Notice::remove_notification_flag();
121
+    flush_rewrite_rules();
122 122
 
123 123
 }
124 124
 
@@ -141,84 +141,84 @@  discard block
 block discarded – undo
141 141
  * @since    1.0.0
142 142
  */
143 143
 function run_wordlift() {
144
-	/**
145
-	 * Filter: wl_feature__enable__widgets.
146
-	 *
147
-	 * @param bool whether the widgets needed to be registered, defaults to true.
148
-	 *
149
-	 * @return bool
150
-	 * @since 3.27.6
151
-	 */
152
-	if ( apply_filters( 'wl_feature__enable__widgets', true ) ) {
153
-		add_action( 'widgets_init', 'wl_register_chord_widget' );
154
-		add_action( 'widgets_init', 'wl_register_geo_widget' );
155
-		add_action( 'widgets_init', 'wl_register_timeline_widget' );
156
-	}
157
-	add_filter( 'widget_text', 'do_shortcode' );
158
-
159
-	/**
160
-	 * Filter: wl_feature__enable__analysis
161
-	 *
162
-	 * @param bool Whether to send api request to analysis or not
163
-	 *
164
-	 * @return bool
165
-	 * @since 3.27.6
166
-	 */
167
-	if ( apply_filters( 'wl_feature__enable__analysis', true ) ) {
168
-		add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_action' );
169
-	} else {
170
-		add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_disabled_action' );
171
-	}
172
-
173
-	$plugin = new Wordlift();
174
-	$plugin->run();
175
-
176
-	// Initialize the TTL Cache Cleaner.
177
-	new Ttl_Cache_Cleaner();
178
-
179
-	// Load the new Post Adapter.
180
-	new Post_Adapter();
181
-
182
-	// Load the API Data Hooks.
183
-	new Api_Data_Hooks();
184
-
185
-	add_action(
186
-		'plugins_loaded',
187
-		function () {
188
-			// All features from registry should be initialized here.
189
-			$features_registry = Features_Registry::get_instance();
190
-			$features_registry->initialize_all_features();
191
-		},
192
-		5
193
-	);
194
-
195
-	add_action(
196
-		'plugins_loaded',
197
-		// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
198
-		function () use ( $plugin ) {
199
-
200
-			new Wordlift_Products_Navigator_Shortcode_REST();
201
-
202
-			// Register the Dataset module, requires `$api_service`.
203
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/dataset/index.php';
204
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/shipping-data/index.php';
205
-
206
-			/*
144
+    /**
145
+     * Filter: wl_feature__enable__widgets.
146
+     *
147
+     * @param bool whether the widgets needed to be registered, defaults to true.
148
+     *
149
+     * @return bool
150
+     * @since 3.27.6
151
+     */
152
+    if ( apply_filters( 'wl_feature__enable__widgets', true ) ) {
153
+        add_action( 'widgets_init', 'wl_register_chord_widget' );
154
+        add_action( 'widgets_init', 'wl_register_geo_widget' );
155
+        add_action( 'widgets_init', 'wl_register_timeline_widget' );
156
+    }
157
+    add_filter( 'widget_text', 'do_shortcode' );
158
+
159
+    /**
160
+     * Filter: wl_feature__enable__analysis
161
+     *
162
+     * @param bool Whether to send api request to analysis or not
163
+     *
164
+     * @return bool
165
+     * @since 3.27.6
166
+     */
167
+    if ( apply_filters( 'wl_feature__enable__analysis', true ) ) {
168
+        add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_action' );
169
+    } else {
170
+        add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_disabled_action' );
171
+    }
172
+
173
+    $plugin = new Wordlift();
174
+    $plugin->run();
175
+
176
+    // Initialize the TTL Cache Cleaner.
177
+    new Ttl_Cache_Cleaner();
178
+
179
+    // Load the new Post Adapter.
180
+    new Post_Adapter();
181
+
182
+    // Load the API Data Hooks.
183
+    new Api_Data_Hooks();
184
+
185
+    add_action(
186
+        'plugins_loaded',
187
+        function () {
188
+            // All features from registry should be initialized here.
189
+            $features_registry = Features_Registry::get_instance();
190
+            $features_registry->initialize_all_features();
191
+        },
192
+        5
193
+    );
194
+
195
+    add_action(
196
+        'plugins_loaded',
197
+        // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
198
+        function () use ( $plugin ) {
199
+
200
+            new Wordlift_Products_Navigator_Shortcode_REST();
201
+
202
+            // Register the Dataset module, requires `$api_service`.
203
+            require_once plugin_dir_path( __FILE__ ) . 'wordlift/dataset/index.php';
204
+            require_once plugin_dir_path( __FILE__ ) . 'wordlift/shipping-data/index.php';
205
+
206
+            /*
207 207
 			* Require the Entity annotation cleanup module.
208 208
 			*
209 209
 			* @since 3.34.6
210 210
 			*/
211
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/cleanup/index.php';
211
+            require_once plugin_dir_path( __FILE__ ) . 'wordlift/cleanup/index.php';
212 212
 
213
-			/*
213
+            /*
214 214
 			* Import LOD entities.
215 215
 			*
216 216
 			* @since 3.35.0
217 217
 			*/
218
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/lod-import/index.php';
218
+            require_once plugin_dir_path( __FILE__ ) . 'wordlift/lod-import/index.php';
219 219
 
220
-		}
221
-	);
220
+        }
221
+    );
222 222
 
223 223
 }
224 224
 
@@ -232,45 +232,45 @@  discard block
 block discarded – undo
232 232
  */
233 233
 function wordlift_plugin_autoload_register() {
234 234
 
235
-	spl_autoload_register(
236
-		function ( $class_name ) {
235
+    spl_autoload_register(
236
+        function ( $class_name ) {
237 237
 
238
-			// Bail out if these are not our classes.
239
-			if ( 0 !== strpos( $class_name, 'Wordlift\\' ) ) {
240
-				return false;
241
-			}
238
+            // Bail out if these are not our classes.
239
+            if ( 0 !== strpos( $class_name, 'Wordlift\\' ) ) {
240
+                return false;
241
+            }
242 242
 
243
-			$class_name_lc = strtolower( str_replace( '_', '-', $class_name ) );
243
+            $class_name_lc = strtolower( str_replace( '_', '-', $class_name ) );
244 244
 
245
-			preg_match( '|^(?:(.*)\\\\)?(.+?)$|', $class_name_lc, $matches );
245
+            preg_match( '|^(?:(.*)\\\\)?(.+?)$|', $class_name_lc, $matches );
246 246
 
247
-			$path = str_replace( '\\', DIRECTORY_SEPARATOR, $matches[1] );
248
-			$file = 'class-' . $matches[2] . '.php';
247
+            $path = str_replace( '\\', DIRECTORY_SEPARATOR, $matches[1] );
248
+            $file = 'class-' . $matches[2] . '.php';
249 249
 
250
-			$full_path = plugin_dir_path( __FILE__ ) . $path . DIRECTORY_SEPARATOR . $file;
250
+            $full_path = plugin_dir_path( __FILE__ ) . $path . DIRECTORY_SEPARATOR . $file;
251 251
 
252
-			if ( ! file_exists( $full_path ) ) {
253
-				return false;
254
-			}
252
+            if ( ! file_exists( $full_path ) ) {
253
+                return false;
254
+            }
255 255
 
256
-			require_once $full_path;
256
+            require_once $full_path;
257 257
 
258
-			return true;
259
-		}
260
-	);
258
+            return true;
259
+        }
260
+    );
261 261
 
262 262
 }
263 263
 
264 264
 function wl_block_categories( $categories ) {
265
-	return array_merge(
266
-		$categories,
267
-		array(
268
-			array(
269
-				'slug'  => 'wordlift',
270
-				'title' => __( 'WordLift', 'wordlift' ),
271
-			),
272
-		)
273
-	);
265
+    return array_merge(
266
+        $categories,
267
+        array(
268
+            array(
269
+                'slug'  => 'wordlift',
270
+                'title' => __( 'WordLift', 'wordlift' ),
271
+            ),
272
+        )
273
+    );
274 274
 }
275 275
 
276 276
 /**
@@ -278,19 +278,19 @@  discard block
 block discarded – undo
278 278
  * this has to be removed when removing the legacy fields from the ui.
279 279
  */
280 280
 function wl_enqueue_leaflet( $in_footer = false ) {
281
-	// Leaflet.
282
-	wp_enqueue_style( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.css', array(), '1.6.0' );
283
-	wp_enqueue_script( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer );
281
+    // Leaflet.
282
+    wp_enqueue_style( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.css', array(), '1.6.0' );
283
+    wp_enqueue_script( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer );
284 284
 }
285 285
 
286 286
 add_filter( 'block_categories', 'wl_block_categories', 10 );
287 287
 
288 288
 // Temporary fix for a typo in WooCommerce Extension.
289 289
 add_filter(
290
-	'wl_feature__enable__dataset',
291
-	function ( $value ) {
292
-		return apply_filters( 'wl_features__enable__dataset', $value );
293
-	}
290
+    'wl_feature__enable__dataset',
291
+    function ( $value ) {
292
+        return apply_filters( 'wl_features__enable__dataset', $value );
293
+    }
294 294
 );
295 295
 
296 296
 require_once __DIR__ . '/modules/food-kg/load.php';
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -32,22 +32,22 @@  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' );
39
+define('WORDLIFT_VERSION', '3.39.0-dev');
40 40
 
41 41
 /**
42 42
  * Filter to disable WLP on any request, defaults to true.
43 43
  *
44 44
  * @since 3.33.6
45 45
  */
46
-if ( ! apply_filters( 'wl_is_enabled', true ) ) {
46
+if ( ! apply_filters('wl_is_enabled', true)) {
47 47
 	return;
48 48
 }
49 49
 
50
-require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
50
+require_once plugin_dir_path(__FILE__).'vendor/autoload.php';
51 51
 
52 52
 /*
53 53
 	 * We introduce the WordLift autoloader, since we start using classes in namespaces, i.e. Wordlift\Http.
@@ -57,15 +57,15 @@  discard block
 block discarded – undo
57 57
 wordlift_plugin_autoload_register();
58 58
 
59 59
 // Include WordLift constants.
60
-require_once plugin_dir_path( __FILE__ ) . 'wordlift-constants.php';
60
+require_once plugin_dir_path(__FILE__).'wordlift-constants.php';
61 61
 
62 62
 // Load modules.
63
-require_once plugin_dir_path( __FILE__ ) . 'modules/core/wordlift-core.php';
63
+require_once plugin_dir_path(__FILE__).'modules/core/wordlift-core.php';
64 64
 
65
-require_once plugin_dir_path( __FILE__ ) . 'deprecations.php';
65
+require_once plugin_dir_path(__FILE__).'deprecations.php';
66 66
 
67 67
 // Load early to enable/disable features.
68
-require_once plugin_dir_path( __FILE__ ) . 'wordlift/features/index.php';
68
+require_once plugin_dir_path(__FILE__).'wordlift/features/index.php';
69 69
 
70 70
 /**
71 71
  * The code that runs during plugin activation.
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
  */
74 74
 function activate_wordlift() {
75 75
 
76
-	$log = Wordlift_Log_Service::get_logger( 'activate_wordlift' );
76
+	$log = Wordlift_Log_Service::get_logger('activate_wordlift');
77 77
 
78
-	$log->info( 'Activating WordLift...' );
78
+	$log->info('Activating WordLift...');
79 79
 
80
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-activator.php';
80
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-activator.php';
81 81
 	Wordlift_Activator::activate();
82 82
 
83 83
 	/**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
  */
105 105
 function deactivate_wordlift() {
106 106
 
107
-	require_once plugin_dir_path( __FILE__ ) . 'includes/class-wordlift-deactivator.php';
107
+	require_once plugin_dir_path(__FILE__).'includes/class-wordlift-deactivator.php';
108 108
 	Wordlift_Deactivator::deactivate();
109 109
 	Wordlift_Http_Api::deactivate();
110 110
 	Ttl_Cache_Cleaner::deactivate();
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
 
123 123
 }
124 124
 
125
-register_activation_hook( __FILE__, 'activate_wordlift' );
126
-register_deactivation_hook( __FILE__, 'deactivate_wordlift' );
125
+register_activation_hook(__FILE__, 'activate_wordlift');
126
+register_deactivation_hook(__FILE__, 'deactivate_wordlift');
127 127
 
128 128
 /**
129 129
  * The core plugin class that is used to define internationalization,
130 130
  * admin-specific hooks, and public-facing site hooks.
131 131
  */
132
-require plugin_dir_path( __FILE__ ) . 'includes/class-wordlift.php';
132
+require plugin_dir_path(__FILE__).'includes/class-wordlift.php';
133 133
 
134 134
 /**
135 135
  * Begins execution of the plugin.
@@ -149,12 +149,12 @@  discard block
 block discarded – undo
149 149
 	 * @return bool
150 150
 	 * @since 3.27.6
151 151
 	 */
152
-	if ( apply_filters( 'wl_feature__enable__widgets', true ) ) {
153
-		add_action( 'widgets_init', 'wl_register_chord_widget' );
154
-		add_action( 'widgets_init', 'wl_register_geo_widget' );
155
-		add_action( 'widgets_init', 'wl_register_timeline_widget' );
152
+	if (apply_filters('wl_feature__enable__widgets', true)) {
153
+		add_action('widgets_init', 'wl_register_chord_widget');
154
+		add_action('widgets_init', 'wl_register_geo_widget');
155
+		add_action('widgets_init', 'wl_register_timeline_widget');
156 156
 	}
157
-	add_filter( 'widget_text', 'do_shortcode' );
157
+	add_filter('widget_text', 'do_shortcode');
158 158
 
159 159
 	/**
160 160
 	 * Filter: wl_feature__enable__analysis
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
 	 * @return bool
165 165
 	 * @since 3.27.6
166 166
 	 */
167
-	if ( apply_filters( 'wl_feature__enable__analysis', true ) ) {
168
-		add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_action' );
167
+	if (apply_filters('wl_feature__enable__analysis', true)) {
168
+		add_action('wp_ajax_wl_analyze', 'wl_ajax_analyze_action');
169 169
 	} else {
170
-		add_action( 'wp_ajax_wl_analyze', 'wl_ajax_analyze_disabled_action' );
170
+		add_action('wp_ajax_wl_analyze', 'wl_ajax_analyze_disabled_action');
171 171
 	}
172 172
 
173 173
 	$plugin = new Wordlift();
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
 	add_action(
186 186
 		'plugins_loaded',
187
-		function () {
187
+		function() {
188 188
 			// All features from registry should be initialized here.
189 189
 			$features_registry = Features_Registry::get_instance();
190 190
 			$features_registry->initialize_all_features();
@@ -195,27 +195,27 @@  discard block
 block discarded – undo
195 195
 	add_action(
196 196
 		'plugins_loaded',
197 197
 		// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
198
-		function () use ( $plugin ) {
198
+		function() use ($plugin) {
199 199
 
200 200
 			new Wordlift_Products_Navigator_Shortcode_REST();
201 201
 
202 202
 			// Register the Dataset module, requires `$api_service`.
203
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/dataset/index.php';
204
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/shipping-data/index.php';
203
+			require_once plugin_dir_path(__FILE__).'wordlift/dataset/index.php';
204
+			require_once plugin_dir_path(__FILE__).'wordlift/shipping-data/index.php';
205 205
 
206 206
 			/*
207 207
 			* Require the Entity annotation cleanup module.
208 208
 			*
209 209
 			* @since 3.34.6
210 210
 			*/
211
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/cleanup/index.php';
211
+			require_once plugin_dir_path(__FILE__).'wordlift/cleanup/index.php';
212 212
 
213 213
 			/*
214 214
 			* Import LOD entities.
215 215
 			*
216 216
 			* @since 3.35.0
217 217
 			*/
218
-			require_once plugin_dir_path( __FILE__ ) . 'wordlift/lod-import/index.php';
218
+			require_once plugin_dir_path(__FILE__).'wordlift/lod-import/index.php';
219 219
 
220 220
 		}
221 221
 	);
@@ -233,23 +233,23 @@  discard block
 block discarded – undo
233 233
 function wordlift_plugin_autoload_register() {
234 234
 
235 235
 	spl_autoload_register(
236
-		function ( $class_name ) {
236
+		function($class_name) {
237 237
 
238 238
 			// Bail out if these are not our classes.
239
-			if ( 0 !== strpos( $class_name, 'Wordlift\\' ) ) {
239
+			if (0 !== strpos($class_name, 'Wordlift\\')) {
240 240
 				return false;
241 241
 			}
242 242
 
243
-			$class_name_lc = strtolower( str_replace( '_', '-', $class_name ) );
243
+			$class_name_lc = strtolower(str_replace('_', '-', $class_name));
244 244
 
245
-			preg_match( '|^(?:(.*)\\\\)?(.+?)$|', $class_name_lc, $matches );
245
+			preg_match('|^(?:(.*)\\\\)?(.+?)$|', $class_name_lc, $matches);
246 246
 
247
-			$path = str_replace( '\\', DIRECTORY_SEPARATOR, $matches[1] );
248
-			$file = 'class-' . $matches[2] . '.php';
247
+			$path = str_replace('\\', DIRECTORY_SEPARATOR, $matches[1]);
248
+			$file = 'class-'.$matches[2].'.php';
249 249
 
250
-			$full_path = plugin_dir_path( __FILE__ ) . $path . DIRECTORY_SEPARATOR . $file;
250
+			$full_path = plugin_dir_path(__FILE__).$path.DIRECTORY_SEPARATOR.$file;
251 251
 
252
-			if ( ! file_exists( $full_path ) ) {
252
+			if ( ! file_exists($full_path)) {
253 253
 				return false;
254 254
 			}
255 255
 
@@ -261,13 +261,13 @@  discard block
 block discarded – undo
261 261
 
262 262
 }
263 263
 
264
-function wl_block_categories( $categories ) {
264
+function wl_block_categories($categories) {
265 265
 	return array_merge(
266 266
 		$categories,
267 267
 		array(
268 268
 			array(
269 269
 				'slug'  => 'wordlift',
270
-				'title' => __( 'WordLift', 'wordlift' ),
270
+				'title' => __('WordLift', 'wordlift'),
271 271
 			),
272 272
 		)
273 273
 	);
@@ -277,22 +277,22 @@  discard block
 block discarded – undo
277 277
  * This function is created temporarily to handle the legacy library,
278 278
  * this has to be removed when removing the legacy fields from the ui.
279 279
  */
280
-function wl_enqueue_leaflet( $in_footer = false ) {
280
+function wl_enqueue_leaflet($in_footer = false) {
281 281
 	// Leaflet.
282
-	wp_enqueue_style( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.css', array(), '1.6.0' );
283
-	wp_enqueue_script( 'wl-leaflet', plugin_dir_url( __FILE__ ) . 'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer );
282
+	wp_enqueue_style('wl-leaflet', plugin_dir_url(__FILE__).'js/leaflet/leaflet.css', array(), '1.6.0');
283
+	wp_enqueue_script('wl-leaflet', plugin_dir_url(__FILE__).'js/leaflet/leaflet.js', array(), '1.6.0', $in_footer);
284 284
 }
285 285
 
286
-add_filter( 'block_categories', 'wl_block_categories', 10 );
286
+add_filter('block_categories', 'wl_block_categories', 10);
287 287
 
288 288
 // Temporary fix for a typo in WooCommerce Extension.
289 289
 add_filter(
290 290
 	'wl_feature__enable__dataset',
291
-	function ( $value ) {
292
-		return apply_filters( 'wl_features__enable__dataset', $value );
291
+	function($value) {
292
+		return apply_filters('wl_features__enable__dataset', $value);
293 293
 	}
294 294
 );
295 295
 
296
-require_once __DIR__ . '/modules/food-kg/load.php';
297
-require_once __DIR__ . '/modules/acf4so/load.php';
298
-require_once __DIR__ . '/modules/pods/load.php';
296
+require_once __DIR__.'/modules/food-kg/load.php';
297
+require_once __DIR__.'/modules/acf4so/load.php';
298
+require_once __DIR__.'/modules/pods/load.php';
Please login to merge, or discard this patch.