@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | self::createOptionPages(); |
72 | 72 | |
73 | 73 | // Register Categories |
74 | - add_action('acf/init', function () { |
|
74 | + add_action('acf/init', function() { |
|
75 | 75 | self::addComponentSubPages(); |
76 | 76 | self::addFeatureSubPages(); |
77 | 77 | self::addCustomPostTypeSubPages(); |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | protected static function collectOptionsWithPrefix($options, $prefix) |
158 | 158 | { |
159 | 159 | $optionKeys = is_array($options) ? array_keys($options) : []; |
160 | - return array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) { |
|
160 | + return array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) { |
|
161 | 161 | $count = 0; |
162 | 162 | $option = $options[$key]; |
163 | 163 | $key = str_replace($prefix, '', $key, $count); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | public static function addComponentData($data, $parentData, $config) |
176 | 176 | { |
177 | 177 | // get fields for this component |
178 | - $options = array_reduce(array_keys(self::$optionTypes), function ($carry, $optionType) use ($config) { |
|
178 | + $options = array_reduce(array_keys(self::$optionTypes), function($carry, $optionType) use ($config) { |
|
179 | 179 | return array_merge($carry, self::get($optionType, 'Component', $config['name'])); |
180 | 180 | }, []); |
181 | 181 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | ]; |
244 | 244 | } |
245 | 245 | |
246 | - add_action('current_screen', function ($currentScreen) { |
|
246 | + add_action('current_screen', function($currentScreen) { |
|
247 | 247 | foreach (self::$optionTypes as $optionType => $option) { |
248 | 248 | $isTranslatable = $option['translatable']; |
249 | 249 | $toplevelPageId = 'toplevel_page_' . $optionType; |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | add_filter('acf/settings/current_language', 'Flynt\Features\Acf\OptionPages::getDefaultAcfLanguage', 101); |
258 | 258 | |
259 | 259 | // hide language selector in admin bar |
260 | - add_action('wp_before_admin_bar_render', function () { |
|
260 | + add_action('wp_before_admin_bar_render', function() { |
|
261 | 261 | $adminBar = $GLOBALS['wp_admin_bar']; |
262 | 262 | $adminBar->remove_menu('WPML_ALS'); |
263 | 263 | }); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | |
355 | 355 | protected static function prefixFields($fields, $prefix) |
356 | 356 | { |
357 | - return array_map(function ($field) use ($prefix) { |
|
357 | + return array_map(function($field) use ($prefix) { |
|
358 | 358 | $field['name'] = $prefix . '_' . $field['name']; |
359 | 359 | return $field; |
360 | 360 | }, $fields); |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | |
406 | 406 | protected static function combineArrayDefaults(array $array, array $defaults) |
407 | 407 | { |
408 | - return array_map(function ($value) use ($defaults) { |
|
408 | + return array_map(function($value) use ($defaults) { |
|
409 | 409 | return is_array($value) ? array_merge($defaults, $value) : []; |
410 | 410 | }, $array); |
411 | 411 | } |