@@ -6,13 +6,13 @@ |
||
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 |
@@ -9,7 +9,7 @@ discard block |
||
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 |
||
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 |
||
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 | }); |
@@ -8,7 +8,7 @@ |
||
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', |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $b = hexdec(substr($color, 4, 2)); |
30 | 30 | } |
31 | 31 | |
32 | - $rgba = [ $r, $g, $b, $opacity ]; |
|
32 | + $rgba = [$r, $g, $b, $opacity]; |
|
33 | 33 | |
34 | 34 | if ($returnType === 'string') { |
35 | 35 | return 'rgba(' . implode(',', $rgba) . ')'; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $s = round($s * 100, 1); |
86 | 86 | $l = round($l * 100, 1); |
87 | 87 | |
88 | - $hsla = [ $h, "$s%", "$l%", $opacity ]; |
|
88 | + $hsla = [$h, "$s%", "$l%", $opacity]; |
|
89 | 89 | |
90 | 90 | if ($returnType === 'string') { |
91 | 91 | return 'hsla(' . implode(',', $hsla) . ')'; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Options; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockPostFooter', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockPostFooter', function($data) { |
|
8 | 8 | |
9 | 9 | return $data; |
10 | 10 | }); |
@@ -147,10 +147,10 @@ discard block |
||
147 | 147 | return $themes; |
148 | 148 | } |
149 | 149 | |
150 | -add_action('acf/init', function () { |
|
150 | +add_action('acf/init', function() { |
|
151 | 151 | $options = Options::getGlobal('CustomizerColors'); |
152 | 152 | if ($options['enabled']) { |
153 | - add_action('customize_register', function ($wp_customize) { |
|
153 | + add_action('customize_register', function($wp_customize) { |
|
154 | 154 | $themes = getThemesConfig(); |
155 | 155 | |
156 | 156 | $wp_customize->add_panel( |
@@ -197,14 +197,14 @@ discard block |
||
197 | 197 | } |
198 | 198 | }); |
199 | 199 | |
200 | - add_action('customize_preview_init', function () { |
|
200 | + add_action('customize_preview_init', function() { |
|
201 | 201 | wp_enqueue_script( |
202 | 202 | 'customizer-colors', |
203 | 203 | Asset::requireUrl('assets/customizer-colors.js'), |
204 | - ['jquery','customize-preview'] |
|
204 | + ['jquery', 'customize-preview'] |
|
205 | 205 | ); |
206 | 206 | $themes = getThemesConfig(); |
207 | - $config = array_map(function ($theme) { |
|
207 | + $config = array_map(function($theme) { |
|
208 | 208 | return $theme['colors']; |
209 | 209 | }, $themes); |
210 | 210 | wp_localize_script('customizer-colors', 'FlyntCustomizerColorsData', $config); |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | } |
213 | 213 | }); |
214 | 214 | |
215 | -add_action('wp_head', function () { |
|
215 | +add_action('wp_head', function() { |
|
216 | 216 | $themes = getThemesConfig(); |
217 | 217 | ?> |
218 | 218 | <style type="text/css"> |
@@ -36,11 +36,11 @@ |
||
36 | 36 | public static function indexedValuesToAssocKeys(array $array) |
37 | 37 | { |
38 | 38 | _deprecated_function(__METHOD__, '%%NEXT_VERSION%%'); |
39 | - $values = array_map(function ($value) { |
|
39 | + $values = array_map(function($value) { |
|
40 | 40 | return is_array($value) ? $value : []; |
41 | 41 | }, $array); |
42 | 42 | |
43 | - $keys = array_map(function ($key) use ($array) { |
|
43 | + $keys = array_map(function($key) use ($array) { |
|
44 | 44 | return is_int($key) ? $array[$key] : $key; |
45 | 45 | }, array_keys($array)); |
46 | 46 |