Passed
Pull Request — master (#258)
by
unknown
04:01
created
functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 // This prevents unintended scrolling on pages with few content, when logged in.
24 24
 add_theme_support('admin-bar', array('callback' => '__return_false'));
25 25
 
26
-add_action('after_setup_theme', function () {
26
+add_action('after_setup_theme', function() {
27 27
     /**
28 28
      * Make theme available for translation.
29 29
      * Translations can be filed in the /languages/ directory.
Please login to merge, or discard this patch.
Components/FeatureGoogleAnalytics/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     return false;
16 16
 }
17 17
 
18
-add_filter('Flynt/addComponentData?name=FeatureGoogleAnalytics', function ($data) {
18
+add_filter('Flynt/addComponentData?name=FeatureGoogleAnalytics', function($data) {
19 19
     $googleAnalyticsOptions = Options::getGlobal('GoogleAnalytics');
20 20
 
21 21
     if ($googleAnalyticsOptions) {
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     return $data;
32 32
 });
33 33
 
34
-add_action('Flynt/thirdPartyCookies/initializeOptions', function () {
34
+add_action('Flynt/thirdPartyCookies/initializeOptions', function() {
35 35
     Options::addTranslatable('GoogleAnalytics', [
36 36
         [
37 37
             'label' => __('Accept Google Analytics label', 'flynt'),
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
     ]);
44 44
 });
45 45
 
46
-add_action('wp_footer', function () {
46
+add_action('wp_footer', function() {
47 47
     $context = Timber::get_context();
48 48
     Timber::render_string('{{ renderComponent("FeatureGoogleAnalytics") }}', $context);
49 49
 });
50 50
 
51
-add_filter('Flynt/thirdPartyCookies', function ($features) {
51
+add_filter('Flynt/thirdPartyCookies', function($features) {
52 52
     $googleAnalyticsTranslatableOptions = Options::getTranslatable('GoogleAnalytics');
53 53
 
54 54
     $features = array_merge($features, [
Please login to merge, or discard this patch.
Components/NavigationBurger/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 use Timber;
6 6
 use Flynt\Utils\Asset;
7 7
 
8
-add_action('init', function () {
8
+add_action('init', function() {
9 9
     register_nav_menus([
10 10
         'navigation_burger' => __('Navigation Burger', 'flynt')
11 11
     ]);
12 12
 });
13 13
 
14
-add_filter('Flynt/addComponentData?name=NavigationBurger', function ($data) {
14
+add_filter('Flynt/addComponentData?name=NavigationBurger', function($data) {
15 15
     $data['menu'] = new Timber\Menu('navigation_burger');
16 16
     $data['logo'] = [
17 17
         'src' => get_theme_mod('custom_header_logo') ? get_theme_mod('custom_header_logo') : Asset::requireUrl('Components/NavigationBurger/Assets/logo.svg'),
Please login to merge, or discard this patch.
inc/customizer-colors.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     
180 180
     /**
181 181
     Section Title - Default
182
-    **/
182
+     **/
183 183
     $wp_customize->add_setting('section_title_default', array(
184 184
         'default'           => '',
185 185
         'sanitize_callback' => 'mytheme_text_sanitization',
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
     /**
220 220
     Separator 1
221
-    **/
221
+     **/
222 222
 
223 223
     $wp_customize->add_setting('separator_1', array(
224 224
         'default'           => '',
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 
237 237
     /**
238 238
     Section Title - Theme Light
239
-    **/
239
+     **/
240 240
     $wp_customize->add_setting('section_title_light', array(
241 241
         'default'           => '',
242 242
         'sanitize_callback' => 'mytheme_text_sanitization',
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 
275 275
     /**
276 276
     Separator 2
277
-    **/
277
+     **/
278 278
 
279 279
     $wp_customize->add_setting('separator_2', array(
280 280
         'default'           => '',
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 
293 293
     /**
294 294
     Section Title - Theme Dark
295
-    **/
295
+     **/
296 296
     $wp_customize->add_setting('section_title_dark', array(
297 297
         'default'           => '',
298 298
         'sanitize_callback' => 'mytheme_text_sanitization',
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 
331 331
     /**
332 332
     Separator 3
333
-    **/
333
+     **/
334 334
 
335 335
     $wp_customize->add_setting('separator_3', array(
336 336
         'default'           => '',
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 
349 349
     /**
350 350
     Section Title - Theme Hero
351
-    **/
351
+     **/
352 352
     $wp_customize->add_setting('section_title_hero', array(
353 353
         'default'           => '',
354 354
         'sanitize_callback' => 'mytheme_text_sanitization',
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
     //Return default if no color provided
403 403
     if (empty($color)) {
404
-          return $default;
404
+            return $default;
405 405
     }
406 406
 
407 407
     //Sanitize $color if "#" is provided
@@ -509,14 +509,14 @@  discard block
 block discarded – undo
509 509
                     };
510 510
                     echo (get_theme_mod('theme_colors_accent')) ? '--color-accent-alpha: ' . hex2rgba(get_theme_mod('theme_colors_accent'), $alphaColorAmount) . ';' : null;
511 511
                     echo (get_theme_mod('theme_colors_accent')) ? '--color-accent-hover: ' . colorBrightness(get_theme_mod('theme_colors_accent'), $darkenColorAmount) . ';' : null;
512
-               } ?>
512
+                } ?>
513 513
                <?php if ($hasChangedLight) {
514 514
                     foreach ($colorsLight as $name => $color) {
515 515
                         echo (get_theme_mod('theme_colors_' . $name)) ? '--color-' . $name . ': ' . get_theme_mod('theme_colors_' . $name) . ';' : null;
516 516
                     };
517 517
                     echo (get_theme_mod('theme_colors_accent-light')) ? '--color-accent-light-alpha: ' . hex2rgba(get_theme_mod('theme_colors_accent-light'), $alphaColorAmount) . ';' : null;
518 518
                     echo (get_theme_mod('theme_colors_accent-light')) ? '--color-accent-light-hover: ' . colorBrightness(get_theme_mod('theme_colors_accent-light'), $darkenColorAmount) . ';' : null;
519
-               } ?>
519
+                } ?>
520 520
                 <?php if ($hasChangedDark) {
521 521
                     foreach ($colorsDark as $name => $color) {
522 522
                         echo (get_theme_mod('theme_colors_' . $name)) ? '--color-' . $name . ': ' . get_theme_mod('theme_colors_' . $name) . ';' : null;
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     ],
145 145
 ];
146 146
 
147
-add_action('customize_register', function ($wp_customize) use ($colorsDefault, $colorsLight, $colorsDark, $colorsHero) {
147
+add_action('customize_register', function($wp_customize) use ($colorsDefault, $colorsLight, $colorsDark, $colorsHero) {
148 148
     $wp_customize->add_section(
149 149
         'theme_colors',
150 150
         [
@@ -385,11 +385,11 @@  discard block
 block discarded – undo
385 385
     }
386 386
 });
387 387
 
388
-add_action('customize_preview_init', function () {
388
+add_action('customize_preview_init', function() {
389 389
     wp_enqueue_script(
390 390
         'customizer-colors',
391 391
         Asset::requireUrl('assets/customizer-colors.js'),
392
-        array('jquery','customize-preview'),
392
+        array('jquery', 'customize-preview'),
393 393
         '',
394 394
         true
395 395
     );
@@ -411,15 +411,15 @@  discard block
 block discarded – undo
411 411
 
412 412
     //Check if color has 6 or 3 characters and get values
413 413
     if (strlen($color) == 6) {
414
-            $hex = array( $color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5] );
414
+            $hex = array($color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]);
415 415
     } elseif (strlen($color) == 3) {
416
-            $hex = array( $color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2] );
416
+            $hex = array($color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]);
417 417
     } else {
418 418
             return $default;
419 419
     }
420 420
 
421 421
     //Convert hexadec to rgb
422
-    $rgb =  array_map('hexdec', $hex);
422
+    $rgb = array_map('hexdec', $hex);
423 423
 
424 424
     //Check if opacity is set(rgba or rgb)
425 425
     if ($opacity) {
@@ -476,23 +476,23 @@  discard block
 block discarded – undo
476 476
     return $hash . $hex;
477 477
 }
478 478
 
479
-add_action('wp_head', function () use ($colorsDefault, $colorsLight, $colorsDark, $colorsHero) {
480
-    $hasChangedDefault = array_filter($colorsDefault, function ($color, $name) {
479
+add_action('wp_head', function() use ($colorsDefault, $colorsLight, $colorsDark, $colorsHero) {
480
+    $hasChangedDefault = array_filter($colorsDefault, function($color, $name) {
481 481
         $value = get_theme_mod('theme_colors_' . $name, $color['default']);
482 482
         return $value !== $color['default'];
483 483
     }, ARRAY_FILTER_USE_BOTH);
484 484
 
485
-    $hasChangedLight = array_filter($colorsLight, function ($color, $name) {
485
+    $hasChangedLight = array_filter($colorsLight, function($color, $name) {
486 486
         $value = get_theme_mod('theme_colors_' . $name, $color['default']);
487 487
         return $value !== $color['default'];
488 488
     }, ARRAY_FILTER_USE_BOTH);
489 489
 
490
-    $hasChangedDark = array_filter($colorsDark, function ($color, $name) {
490
+    $hasChangedDark = array_filter($colorsDark, function($color, $name) {
491 491
         $value = get_theme_mod('theme_colors_' . $name, $color['default']);
492 492
         return $value !== $color['default'];
493 493
     }, ARRAY_FILTER_USE_BOTH);
494 494
 
495
-    $hasChangedHero = array_filter($colorsHero, function ($color, $name) {
495
+    $hasChangedHero = array_filter($colorsHero, function($color, $name) {
496 496
         $value = get_theme_mod('theme_colors_' . $name, $color['default']);
497 497
         return $value !== $color['default'];
498 498
     }, ARRAY_FILTER_USE_BOTH);
Please login to merge, or discard this patch.