@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | if (count($files) === 0) { |
45 | 45 | $dir = get_template_directory() . '/' . $dir; |
46 | 46 | |
47 | - self::iterateDir($dir, function ($file) { |
|
47 | + self::iterateDir($dir, function($file) { |
|
48 | 48 | if ($file->isDir()) { |
49 | 49 | $dirPath = trim(str_replace(get_template_directory(), '', $file->getPathname()), '/'); |
50 | 50 | self::loadPhpFiles($dirPath); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | }); |
56 | 56 | } else { |
57 | - array_walk($files, function ($file) use ($dir) { |
|
57 | + array_walk($files, function($file) use ($dir) { |
|
58 | 58 | $filePath = $dir . '/' . ltrim($file, '/'); |
59 | 59 | |
60 | 60 | if (!locate_template($filePath, true, true)) { |
@@ -17,18 +17,18 @@ |
||
17 | 17 | // only converts first dimension of object |
18 | 18 | public static function objectToArray($obj) |
19 | 19 | { |
20 | - return array_map(function ($val) { |
|
20 | + return array_map(function($val) { |
|
21 | 21 | return (array) $val; |
22 | 22 | }, $obj); |
23 | 23 | } |
24 | 24 | |
25 | 25 | public static function indexedValuesToAssocKeys(array $array) |
26 | 26 | { |
27 | - $values = array_map(function ($value) { |
|
27 | + $values = array_map(function($value) { |
|
28 | 28 | return is_array($value) ? $value : []; |
29 | 29 | }, $array); |
30 | 30 | |
31 | - $keys = array_map(function ($key) use ($array) { |
|
31 | + $keys = array_map(function($key) use ($array) { |
|
32 | 32 | return is_int($key) ? $array[$key] : $key; |
33 | 33 | }, array_keys($array)); |
34 | 34 |
@@ -51,7 +51,7 @@ |
||
51 | 51 | if (is_array($value)) { |
52 | 52 | // Loop through array and apply translations while keeping keys intact |
53 | 53 | // NOTE: assuming it's a single dimensional array |
54 | - return array_reduce(array_keys($value), function ($carry, $key) use ($value) { |
|
54 | + return array_reduce(array_keys($value), function($carry, $key) use ($value) { |
|
55 | 55 | return array_merge($carry, [ |
56 | 56 | $key => _x($value[$key], $key, 'flynt-starter-theme') |
57 | 57 | ]); |
@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | // register all components |
13 | 13 | $componentPath = trailingslashit(Feature::getOption('flynt-components', 0)); |
14 | 14 | |
15 | -add_action('Flynt/afterRegisterFeatures', function () use ($componentPath) { |
|
15 | +add_action('Flynt/afterRegisterFeatures', function() use ($componentPath) { |
|
16 | 16 | if (is_dir($componentPath)) { |
17 | 17 | $components = []; |
18 | - FileLoader::iterateDir($componentPath, function ($dir) use (&$components) { |
|
18 | + FileLoader::iterateDir($componentPath, function($dir) use (&$components) { |
|
19 | 19 | if ($dir->isDir()) { |
20 | 20 | $components[] = $dir->getFilename(); |
21 | 21 | } |
@@ -26,6 +26,6 @@ discard block |
||
26 | 26 | }); |
27 | 27 | |
28 | 28 | // set Component Path |
29 | -add_filter('Flynt/componentPath', function ($defaultPath, $componentName) use ($componentPath) { |
|
29 | +add_filter('Flynt/componentPath', function($defaultPath, $componentName) use ($componentPath) { |
|
30 | 30 | return $componentPath . $componentName; |
31 | 31 | }, 10, 2); |
@@ -6,7 +6,7 @@ |
||
6 | 6 | { |
7 | 7 | public static function init() |
8 | 8 | { |
9 | - add_filter('acf/fields/google_map/api', function ($api) { |
|
9 | + add_filter('acf/fields/google_map/api', function($api) { |
|
10 | 10 | $apiKey = OptionPages::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey'); |
11 | 11 | if ($apiKey) { |
12 | 12 | $api['key'] = $apiKey; |