@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=SliderImages', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=SliderImages', function($data) { |
|
8 | 8 | Component::enqueueAssets('SliderImages', [ |
9 | 9 | [ |
10 | 10 | 'name' => 'slick-carousel', |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=SliderImageGallery', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=SliderImageGallery', function($data) { |
|
8 | 8 | Component::enqueueAssets('SliderImageGallery', [ |
9 | 9 | [ |
10 | 10 | 'name' => 'slick-carousel', |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockBaseStyle', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockBaseStyle', function($data) { |
|
8 | 8 | Component::enqueueAssets('BlockBaseStyle'); |
9 | 9 | return $data; |
10 | 10 | }); |
@@ -5,13 +5,13 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
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_footer' => __('Navigation Footer', 'flynt-starter-theme') |
11 | 11 | ]); |
12 | 12 | }); |
13 | 13 | |
14 | -add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
|
14 | +add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) { |
|
15 | 15 | Component::enqueueAssets('NavigationFooter'); |
16 | 16 | |
17 | 17 | // set max level of the menu |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Flynt\Features\Acf\OptionPages; |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockCookieNotice', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockCookieNotice', function($data) { |
|
8 | 8 | Component::enqueueAssets('BlockCookieNotice'); |
9 | 9 | |
10 | 10 | return $data; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\'); |
8 | 8 | |
9 | -add_action('Flynt/afterRegisterComponents', function () { |
|
9 | +add_action('Flynt/afterRegisterComponents', function() { |
|
10 | 10 | $componentManager = Flynt\ComponentManager::getInstance(); |
11 | 11 | $componentWhitelist = []; |
12 | 12 | if (isset($_GET['component']) && !empty($_GET['component'])) { |
@@ -41,21 +41,21 @@ discard block |
||
41 | 41 | { |
42 | 42 | $type = gettype($data); |
43 | 43 | $output = json_encode($data); |
44 | - $result = "<script>console.log({$output});</script>\n"; |
|
44 | + $result = "<script>console.log({$output});</script>\n"; |
|
45 | 45 | echoDebug($result, $postpone); |
46 | 46 | } |
47 | 47 | |
48 | 48 | function consoleTable($data, $postpone = true) |
49 | 49 | { |
50 | 50 | $output = json_encode($data); |
51 | - $result = "<script>console.table({$output});</script>\n"; |
|
51 | + $result = "<script>console.table({$output});</script>\n"; |
|
52 | 52 | echoDebug($result, $postpone); |
53 | 53 | } |
54 | 54 | |
55 | 55 | function echoDebug($data, $postpone) |
56 | 56 | { |
57 | 57 | if ($postpone) { |
58 | - add_action('wp_footer', function () use ($data) { |
|
58 | + add_action('wp_footer', function() use ($data) { |
|
59 | 59 | echo $data; |
60 | 60 | }, 30); |
61 | 61 | } else { |
@@ -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); |
@@ -27,7 +27,7 @@ |
||
27 | 27 | return $output; |
28 | 28 | } |
29 | 29 | |
30 | - // this action needs to be removed by the user if they want to overwrite this functionality |
|
30 | + // this action needs to be removed by the user if they want to overwrite this functionality |
|
31 | 31 | public static function loadFunctionsFile($componentName) |
32 | 32 | { |
33 | 33 | $componentManager = ComponentManager::getInstance(); |
@@ -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); |