@@ -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 |
@@ -6,13 +6,13 @@ |
||
6 | 6 | use Flynt\Utils\Asset; |
7 | 7 | use Timber\Menu; |
8 | 8 | |
9 | -add_action('init', function () { |
|
9 | +add_action('init', function() { |
|
10 | 10 | register_nav_menus([ |
11 | 11 | 'navigation_main' => __('Navigation Main', 'flynt') |
12 | 12 | ]); |
13 | 13 | }); |
14 | 14 | |
15 | -add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) { |
|
15 | +add_filter('Flynt/addComponentData?name=NavigationMain', function($data) { |
|
16 | 16 | $data['menu'] = new Menu('navigation_main'); |
17 | 17 | $data['logo'] = [ |
18 | 18 | 'src' => get_theme_mod('custom_header_logo') ? get_theme_mod('custom_header_logo') : Asset::requireUrl('Components/NavigationMain/Assets/logo.svg'), |
@@ -5,13 +5,13 @@ |
||
5 | 5 | use Flynt\Utils\Asset; |
6 | 6 | use Timber\Menu; |
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 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'), |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | namespace Flynt\MimeTypes; |
8 | 8 | |
9 | -add_filter('upload_mimes', function ($mimes) { |
|
9 | +add_filter('upload_mimes', function($mimes) { |
|
10 | 10 | $mimes['svg'] = 'image/svg+xml'; |
11 | 11 | return $mimes; |
12 | 12 | }); |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | // If you use a SVG Optimizer like svgo the xml will be removed by default. |
15 | 15 | // The fix will add the type "image/svg+xml" to files without a xml tag. |
16 | 16 | // Details: https://wordpress.stackexchange.com/questions/340523/why-does-svg-upload-in-media-library-fail-if-the-file-does-not-have-an-xml-tag-a |
17 | -add_filter('wp_check_filetype_and_ext', function ($data, $file, $filename, $mimes, $real_mime) { |
|
17 | +add_filter('wp_check_filetype_and_ext', function($data, $file, $filename, $mimes, $real_mime) { |
|
18 | 18 | |
19 | 19 | if (!empty($data['ext']) && !empty($data['type'])) { |
20 | 20 | return $data; |