@@ -7,11 +7,11 @@ discard block |
||
7 | 7 | use Flynt\Utils\Options; |
8 | 8 | use Flynt\Utils\Asset; |
9 | 9 | |
10 | -add_filter('Flynt/addComponentData?name=ListComponents', function ($data) { |
|
10 | +add_filter('Flynt/addComponentData?name=ListComponents', function($data) { |
|
11 | 11 | if (!empty($data['componentBlocks'])) { |
12 | - $data['componentBlocks'] = array_map(function ($block) { |
|
12 | + $data['componentBlocks'] = array_map(function($block) { |
|
13 | 13 | $componentPaths = explode('/', $block['component']); |
14 | - $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3)); |
|
14 | + $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3)); |
|
15 | 15 | |
16 | 16 | if (file_exists(Asset::requirePath($block['component'] . 'screenshot.png'))) { |
17 | 17 | $src = Asset::requireUrl($block['component'] . 'screenshot.png'); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | return $data; |
37 | 37 | }); |
38 | 38 | |
39 | -add_filter('acf/load_field/name=component', function ($field) { |
|
39 | +add_filter('acf/load_field/name=component', function($field) { |
|
40 | 40 | $componentManager = ComponentManager::getInstance(); |
41 | 41 | $field['choices'] = array_flip($componentManager->getAll()); |
42 | 42 | return $field; |