Completed
Pull Request — master (#13)
by
unknown
04:25
created
src/LIN3S/WPFoundation/Configuration/Optimization/AssetsCleanup.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@
 block discarded – undo
15 15
 {
16 16
     public function __construct()
17 17
     {
18
-        add_action('wp_default_scripts', [$this, 'dequeueJQueryMigrate']);
18
+        add_action('wp_default_scripts', [ $this, 'dequeueJQueryMigrate' ]);
19 19
 
20 20
         if (defined('ICL_LANGUAGE_CODE')) {
21 21
             // DO NOT LOAD WPML LANG SWITCHER CSS
22 22
             define('ICL_DONT_LOAD_LANGUAGE_SELECTOR_CSS', true);
23
-            add_action('wp_head', [$this, 'dequeueSitepressJs'], 11);
23
+            add_action('wp_head', [ $this, 'dequeueSitepressJs' ], 11);
24 24
         }
25 25
     }
26 26
 
27 27
     public function dequeueJQueryMigrate($scripts)
28 28
     {
29
-        if (!is_admin() && !empty($scripts->registered['jquery'])) {
30
-            $jquery_dependencies = $scripts->registered['jquery']->deps;
31
-            $scripts->registered['jquery']->deps = array_diff($jquery_dependencies, ['jquery-migrate']);
29
+        if (!is_admin() && !empty($scripts->registered[ 'jquery' ])) {
30
+            $jquery_dependencies = $scripts->registered[ 'jquery' ]->deps;
31
+            $scripts->registered[ 'jquery' ]->deps = array_diff($jquery_dependencies, [ 'jquery-migrate' ]);
32 32
         }
33 33
     }
34 34
 
Please login to merge, or discard this patch.