@@ -23,7 +23,7 @@ |
||
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. |
@@ -15,7 +15,7 @@ discard block |
||
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 |
||
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 |
||
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, [ |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | ], |
40 | 40 | ]; |
41 | 41 | |
42 | -add_action('customize_register', function ($wp_customize) use ($colors) { |
|
42 | +add_action('customize_register', function($wp_customize) use ($colors) { |
|
43 | 43 | $wp_customize->add_section( |
44 | 44 | 'theme_colors', |
45 | 45 | [ |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | } |
74 | 74 | }); |
75 | 75 | |
76 | -add_action('customize_preview_init', function () { |
|
76 | +add_action('customize_preview_init', function() { |
|
77 | 77 | wp_enqueue_script( |
78 | 78 | 'customizer-colors', |
79 | 79 | Asset::requireUrl('assets/customizer-colors.js'), |
80 | - array('jquery','customize-preview'), |
|
80 | + array('jquery', 'customize-preview'), |
|
81 | 81 | '', |
82 | 82 | true |
83 | 83 | ); |
84 | 84 | }); |
85 | 85 | |
86 | -add_action('wp_head', function () use ($colors) { |
|
87 | - $hasChanged = array_filter($colors, function ($color, $name) { |
|
86 | +add_action('wp_head', function() use ($colors) { |
|
87 | + $hasChanged = array_filter($colors, function($color, $name) { |
|
88 | 88 | $value = get_theme_mod('theme_colors_' . $name, $color['default']); |
89 | 89 | return $value !== $color['default']; |
90 | 90 | }, ARRAY_FILTER_USE_BOTH); |
@@ -5,13 +5,13 @@ |
||
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'), |