Passed
Pull Request — master (#258)
by
unknown
04:23
created
inc/removeEditor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 
7 7
 namespace Flynt\RemoveEditor;
8 8
 
9
-add_action('init', function () {
9
+add_action('init', function() {
10 10
     remove_post_type_support('page', 'editor');
11 11
     remove_post_type_support('post', 'editor');
12 12
 });
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 /**
15 15
  * Removes Gutenberg default styles on front-end
16 16
  */
17
-add_action('wp_print_styles', function () {
17
+add_action('wp_print_styles', function() {
18 18
     wp_dequeue_style('wp-block-library');
19 19
     wp_dequeue_style('wp-block-library-theme');
20 20
 });
Please login to merge, or discard this patch.
inc/timberDynamicResize.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 use Flynt\Utils\TimberDynamicResize;
7 7
 use acf_field_message;
8 8
 
9
-add_action('acf/init', function () {
9
+add_action('acf/init', function() {
10 10
     global $timberDynamicResize;
11 11
     $timberDynamicResize = new TimberDynamicResize();
12 12
 });
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
 add_filter(
49 49
     'acf/load_field/key=field_global_TimberDynamicResize_relativeUploadPath',
50
-    function ($field) {
50
+    function($field) {
51 51
         $field['placeholder'] = TimberDynamicResize::getDefaultRelativeUploadDir();
52 52
         return $field;
53 53
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 add_filter(
57 57
     'acf/load_field/key=field_global_TimberDynamicResize_webpSupport',
58
-    function ($field) {
58
+    function($field) {
59 59
         if (!function_exists('imagewebp')) {
60 60
             $messageField = new acf_field_message();
61 61
             $field = array_merge($messageField->defaults, $field);
@@ -68,14 +68,14 @@  discard block
 block discarded – undo
68 68
 
69 69
 add_filter(
70 70
     'acf/load_value/key=field_global_TimberDynamicResize_webpSupport',
71
-    function ($value) {
71
+    function($value) {
72 72
         return function_exists('imagewebp') ? $value : '0';
73 73
     }
74 74
 );
75 75
 
76 76
 add_action(
77 77
     'update_option_options_global_TimberDynamicResize_dynamicImageGeneration',
78
-    function ($oldValue, $value) {
78
+    function($oldValue, $value) {
79 79
         global $timberDynamicResize;
80 80
         $timberDynamicResize->toggleDynamic($value === '1');
81 81
     },
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 add_action(
87 87
     'update_option_options_global_TimberDynamicResize_webpSupport',
88
-    function ($oldValue, $value) {
88
+    function($oldValue, $value) {
89 89
         global $timberDynamicResize;
90 90
         $timberDynamicResize->toggleWebp($value === '1');
91 91
     },
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 
96 96
 add_action(
97 97
     'update_option_options_global_TimberDynamicResize_relativeUploadPath',
98
-    function ($oldValue, $value) {
98
+    function($oldValue, $value) {
99 99
         global $timberDynamicResize;
100 100
         $timberDynamicResize->changeRelativeUploadPath($value);
101 101
     },
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 );
105 105
 
106 106
 # WPML REWRITE FIX
107
-add_filter('mod_rewrite_rules', function ($rules) {
107
+add_filter('mod_rewrite_rules', function($rules) {
108 108
     $homeRoot = parse_url(home_url());
109 109
     if (isset($homeRoot['path'])) {
110 110
         $homeRoot = trailingslashit($homeRoot['path']);
Please login to merge, or discard this patch.
Components/NavigationFooter/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
6 6
 use Timber\Menu;
7 7
 use Flynt\Shortcodes;
8 8
 
9
-add_action('init', function () {
9
+add_action('init', function() {
10 10
     register_nav_menus([
11 11
         'navigation_footer' => __('Navigation Footer', 'flynt')
12 12
     ]);
13 13
 });
14 14
 
15
-add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) {
15
+add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) {
16 16
     $data['maxLevel'] = 0;
17 17
     $data['menu'] = new Menu('navigation_footer');
18 18
 
Please login to merge, or discard this patch.
inc/shortcodes.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 /**
10 10
  * Current year
11 11
  */
12
-add_shortcode('year', function () {
12
+add_shortcode('year', function() {
13 13
     $year = date_i18n('Y');
14 14
     return $year;
15 15
 });
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 /**
18 18
  * Site Title
19 19
  */
20
-add_shortcode('sitetitle', function () {
20
+add_shortcode('sitetitle', function() {
21 21
     $blogname = get_bloginfo('name');
22 22
     return $blogname;
23 23
 });
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 /**
26 26
  * Tagline
27 27
  */
28
-add_shortcode('tagline', function () {
28
+add_shortcode('tagline', function() {
29 29
     $tagline = get_bloginfo('description');
30 30
     return $tagline;
31 31
 });
Please login to merge, or discard this patch.
inc/customizerLogo.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
 use WP_Customize_Image_Control;
10 10
 
11
-add_action('customize_register', function ($wp_customize) {
11
+add_action('customize_register', function($wp_customize) {
12 12
     // Add option to replace header logo
13 13
     $wp_customize->add_setting(
14 14
         'custom_header_logo',
Please login to merge, or discard this patch.
inc/customizerColors.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
 
240 240
     // Return default if no color provided
241 241
     if (empty($color)) {
242
-          return $default;
242
+            return $default;
243 243
     }
244 244
 
245 245
     // Sanitize $color if "#" is provided
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -136,10 +136,10 @@  discard block
 block discarded – undo
136 136
     ];
137 137
 }
138 138
 
139
-add_action('acf/init', function () {
139
+add_action('acf/init', function() {
140 140
     $options = Options::getGlobal('CustomizerColors');
141 141
     if ($options['enabled']) {
142
-        add_action('customize_register', function ($wp_customize) {
142
+        add_action('customize_register', function($wp_customize) {
143 143
             $config = getConfig();
144 144
             $wp_customize->add_panel(
145 145
                 'theme_colors_panel',
@@ -185,17 +185,17 @@  discard block
 block discarded – undo
185 185
             }
186 186
         });
187 187
 
188
-        add_action('customize_preview_init', function () {
188
+        add_action('customize_preview_init', function() {
189 189
             wp_enqueue_script(
190 190
                 'customizer-colors',
191 191
                 Asset::requireUrl('assets/customizer-colors.js'),
192
-                array('jquery','customize-preview'),
192
+                array('jquery', 'customize-preview'),
193 193
                 '',
194 194
                 true
195 195
             );
196 196
         });
197 197
 
198
-        add_action('wp_head', function () {
198
+        add_action('wp_head', function() {
199 199
             $config = getConfig();
200 200
 
201 201
             $alphaColorAmount = 0.4;
@@ -249,15 +249,15 @@  discard block
 block discarded – undo
249 249
 
250 250
     // Check if color has 6 or 3 characters and get values
251 251
     if (strlen($color) == 6) {
252
-            $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
252
+            $hex = array($color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]);
253 253
     } elseif (strlen($color) == 3) {
254
-            $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
254
+            $hex = array($color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]);
255 255
     } else {
256 256
             return $default;
257 257
     }
258 258
 
259 259
     // Convert hexadec to rgb
260
-    $rgb =  array_map('hexdec', $hex);
260
+    $rgb = array_map('hexdec', $hex);
261 261
 
262 262
     // Check if opacity is set(rgba or rgb)
263 263
     if ($opacity) {
Please login to merge, or discard this patch.