@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | |
4 | 4 | use Flynt\Utils\Options; |
5 | 5 | |
6 | -add_filter('pre_http_request', function ($preempt, $args, $url) { |
|
6 | +add_filter('pre_http_request', function($preempt, $args, $url) { |
|
7 | 7 | if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) { |
8 | 8 | $response = wp_cache_get($url, 'oembedCache'); |
9 | 9 | if (!empty($response)) { |
@@ -13,14 +13,14 @@ discard block |
||
13 | 13 | return false; |
14 | 14 | }, 10, 3); |
15 | 15 | |
16 | -add_filter('http_response', function ($response, $args, $url) { |
|
16 | +add_filter('http_response', function($response, $args, $url) { |
|
17 | 17 | if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) { |
18 | 18 | wp_cache_set($url, $response, 'oembedCache'); |
19 | 19 | } |
20 | 20 | return $response; |
21 | 21 | }, 10, 3); |
22 | 22 | |
23 | -add_filter('acf/fields/google_map/api', function ($api) { |
|
23 | +add_filter('acf/fields/google_map/api', function($api) { |
|
24 | 24 | $apiKey = Options::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey'); |
25 | 25 | if ($apiKey) { |
26 | 26 | $api['key'] = $apiKey; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | } |
104 | 104 | |
105 | - add_action('current_screen', function ($currentScreen) { |
|
105 | + add_action('current_screen', function($currentScreen) { |
|
106 | 106 | $currentScreenId = strtolower($currentScreen->id); |
107 | 107 | foreach (static::OPTION_TYPES as $optionType => $option) { |
108 | 108 | $isTranslatable = $option['translatable']; |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | ); |
132 | 132 | |
133 | 133 | // hide language selector in admin bar |
134 | - add_action('wp_before_admin_bar_render', function () { |
|
134 | + add_action('wp_before_admin_bar_render', function() { |
|
135 | 135 | $adminBar = $GLOBALS['wp_admin_bar']; |
136 | 136 | $adminBar->remove_menu('WPML_ALS'); |
137 | 137 | }); |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | ] ?? [])[$groupName] ?? []; |
194 | 194 | return array_combine( |
195 | 195 | $optionNames, |
196 | - array_map(function ($optionName) use ( |
|
196 | + array_map(function($optionName) use ( |
|
197 | 197 | $prefix, |
198 | 198 | $isTranslatable |
199 | 199 | ) { |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | |
304 | 304 | protected static function prefixFields($fields, $prefix) |
305 | 305 | { |
306 | - return array_map(function ($field) use ($prefix) { |
|
306 | + return array_map(function($field) use ($prefix) { |
|
307 | 307 | $field['name'] = $prefix . '_' . $field['name']; |
308 | 308 | return $field; |
309 | 309 | }, $fields); |