@@ -8,7 +8,7 @@ |
||
8 | 8 | { |
9 | 9 | public static function init() |
10 | 10 | { |
11 | - add_filter('acf/fields/google_map/api', function ($api) { |
|
11 | + add_filter('acf/fields/google_map/api', function($api) { |
|
12 | 12 | $apiKey = Options::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey'); |
13 | 13 | if ($apiKey) { |
14 | 14 | $api['key'] = $apiKey; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | acf_add_local_field_group($fieldGroup); |
86 | 86 | } |
87 | 87 | |
88 | - add_action('current_screen', function ($currentScreen) { |
|
88 | + add_action('current_screen', function($currentScreen) { |
|
89 | 89 | foreach (static::OPTION_TYPES as $optionType => $option) { |
90 | 90 | $isTranslatable = $option['translatable']; |
91 | 91 | $toplevelPageId = 'toplevel_page_' . $optionType; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | add_filter('acf/settings/current_language', 'Flynt\Features\Acf\OptionPages::getDefaultAcfLanguage', 101); |
100 | 100 | |
101 | 101 | // hide language selector in admin bar |
102 | - add_action('wp_before_admin_bar_render', function () { |
|
102 | + add_action('wp_before_admin_bar_render', function() { |
|
103 | 103 | $adminBar = $GLOBALS['wp_admin_bar']; |
104 | 104 | $adminBar->remove_menu('WPML_ALS'); |
105 | 105 | }); |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | |
219 | 219 | protected static function prefixFields($fields, $prefix) |
220 | 220 | { |
221 | - return array_map(function ($field) use ($prefix) { |
|
221 | + return array_map(function($field) use ($prefix) { |
|
222 | 222 | $field['name'] = $prefix . '_' . $field['name']; |
223 | 223 | return $field; |
224 | 224 | }, $fields); |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | protected static function collectOptionsWithPrefix($options, $prefix) |
283 | 283 | { |
284 | 284 | $optionKeys = is_array($options) ? array_keys($options) : []; |
285 | - return array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) { |
|
285 | + return array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) { |
|
286 | 286 | $count = 0; |
287 | 287 | $option = $options[$key]; |
288 | 288 | $key = str_replace($prefix, '', $key, $count); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | } |
17 | 17 | |
18 | 18 | // collect script dependencies |
19 | - $scriptDeps = array_reduce($dependencies, function ($list, $dependency) { |
|
19 | + $scriptDeps = array_reduce($dependencies, function($list, $dependency) { |
|
20 | 20 | if ($dependency['type'] === 'script') { |
21 | 21 | array_push($list, $dependency['name']); |
22 | 22 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | // collect style dependencies |
38 | - $styleDeps = array_reduce($dependencies, function ($list, $dependency) { |
|
38 | + $styleDeps = array_reduce($dependencies, function($list, $dependency) { |
|
39 | 39 | if ($dependency['type'] === 'style') { |
40 | 40 | array_push($list, $dependency['name']); |
41 | 41 | } |
@@ -48,13 +48,13 @@ |
||
48 | 48 | return ''; |
49 | 49 | } |
50 | 50 | |
51 | - $area = function ($areaName) use ($areaHtml) { |
|
51 | + $area = function($areaName) use ($areaHtml) { |
|
52 | 52 | if (array_key_exists($areaName, $areaHtml)) { |
53 | 53 | return $areaHtml[$areaName]; |
54 | 54 | } |
55 | 55 | }; |
56 | 56 | |
57 | - $data = function () use ($componentData) { |
|
57 | + $data = function() use ($componentData) { |
|
58 | 58 | $args = func_get_args(); |
59 | 59 | array_unshift($args, $componentData); |
60 | 60 | return Helpers::extractNestedDataFromArray($args); |
@@ -6,17 +6,17 @@ |
||
6 | 6 | use Timber\Menu; |
7 | 7 | use Flynt\Utils\Asset; |
8 | 8 | |
9 | -add_action('wp_enqueue_scripts', function () { |
|
9 | +add_action('wp_enqueue_scripts', function() { |
|
10 | 10 | Component::enqueueAssets('NavigationMain'); |
11 | 11 | }); |
12 | 12 | |
13 | -add_action('init', function () { |
|
13 | +add_action('init', function() { |
|
14 | 14 | register_nav_menus([ |
15 | 15 | 'navigation_main' => __('Navigation Main', 'flynt-starter-theme') |
16 | 16 | ]); |
17 | 17 | }); |
18 | 18 | |
19 | -add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) { |
|
19 | +add_filter('Flynt/addComponentData?name=NavigationMain', function($data) { |
|
20 | 20 | $data['maxLevel'] = 0; |
21 | 21 | $data['menu'] = new Menu('navigation_main'); |
22 | 22 |
@@ -5,11 +5,11 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) { |
|
9 | 9 | Component::enqueueAssets('GridDownloadPortrait'); |
10 | 10 | |
11 | 11 | if (!empty($data['items'])) { |
12 | - $data['items'] = array_map(function ($item) { |
|
12 | + $data['items'] = array_map(function($item) { |
|
13 | 13 | if ($item['itemType'] === 'itemFile') { |
14 | 14 | $fileSize = filesize(get_attached_file($item['file']['id'])); |
15 | 15 | $item['file']['fileSize'] = size_format($fileSize); |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=GridContentLists', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=GridContentLists', function($data) { |
|
9 | 9 | Component::enqueueAssets('GridContentLists'); |
10 | 10 | |
11 | 11 | return $data; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=HeroCta', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=HeroCta', function($data) { |
|
9 | 9 | Component::enqueueAssets('HeroCta'); |
10 | 10 | |
11 | 11 | return $data; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=GridPosts', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=GridPosts', function($data) { |
|
9 | 9 | Component::enqueueAssets('GridPosts'); |
10 | 10 | |
11 | 11 | return $data; |