@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=HeroImage', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=HeroImage', function($data) { |
|
8 | 8 | Component::enqueueAssets('HeroImage', [ |
9 | 9 | [ |
10 | 10 | 'name' => 'lazysizes', |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=AccordionDefault', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=AccordionDefault', function($data) { |
|
8 | 8 | Component::enqueueAssets('AccordionDefault'); |
9 | 9 | return $data; |
10 | 10 | }); |
@@ -6,22 +6,22 @@ discard block |
||
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | use Flynt\Utils\Asset; |
8 | 8 | |
9 | -add_filter('Flynt/addComponentData?name=ListComponents', function ($data) { |
|
9 | +add_filter('Flynt/addComponentData?name=ListComponents', function($data) { |
|
10 | 10 | Component::enqueueAssets('ListComponents'); |
11 | 11 | |
12 | 12 | if (!empty($data['componentBlocks'])) { |
13 | - $data['componentBlocks'] = array_map(function ($block) { |
|
13 | + $data['componentBlocks'] = array_map(function($block) { |
|
14 | 14 | $componentPaths = explode('/', $block['component']); |
15 | - $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3)); |
|
15 | + $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3)); |
|
16 | 16 | |
17 | - if (file_exists(Asset::requirePath($block['component']."preview-desktop.jpg"))) { |
|
18 | - $block['componentPreviewDesktopUrl'] = Asset::requireUrl($block['component']."preview-desktop.jpg"); |
|
17 | + if (file_exists(Asset::requirePath($block['component'] . "preview-desktop.jpg"))) { |
|
18 | + $block['componentPreviewDesktopUrl'] = Asset::requireUrl($block['component'] . "preview-desktop.jpg"); |
|
19 | 19 | } |
20 | 20 | |
21 | - if (file_exists(Asset::requirePath($block['component']."preview-mobile.jpg"))) { |
|
22 | - $block['componentPreviewMobileUrl'] = Asset::requireUrl($block['component']."preview-mobile.jpg"); |
|
21 | + if (file_exists(Asset::requirePath($block['component'] . "preview-mobile.jpg"))) { |
|
22 | + $block['componentPreviewMobileUrl'] = Asset::requireUrl($block['component'] . "preview-mobile.jpg"); |
|
23 | 23 | } |
24 | - $readme = Asset::requirePath($block['component']."README.md"); |
|
24 | + $readme = Asset::requirePath($block['component'] . "README.md"); |
|
25 | 25 | |
26 | 26 | if (file_exists($readme)) { |
27 | 27 | $block['readme'] = parsePreviewContent(file_get_contents($readme)); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | }); |
36 | 36 | |
37 | 37 | |
38 | -add_filter('acf/load_field/name=component', function ($field) { |
|
38 | +add_filter('acf/load_field/name=component', function($field) { |
|
39 | 39 | $componentManager = ComponentManager::getInstance(); |
40 | 40 | $field['choices'] = array_flip($componentManager->getAll()); |
41 | 41 | return $field; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Asset; |
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=ListSearchResults', function ($data, $parentData) { |
|
8 | +add_filter('Flynt/addComponentData?name=ListSearchResults', function($data, $parentData) { |
|
9 | 9 | Component::enqueueAssets('ListSearchResults'); |
10 | 10 | |
11 | 11 | global $wp_query; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockImageText', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockImageText', function($data) { |
|
8 | 8 | Component::enqueueAssets('BlockImageText'); |
9 | 9 | |
10 | 10 | return $data; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | use Flynt\Utils\Oembed; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) { |
|
9 | 9 | Component::enqueueAssets('BlockVideoOembed'); |
10 | 10 | |
11 | 11 | $data['video'] = Oembed::setSrcAsDataAttribute( |
@@ -5,11 +5,11 @@ |
||
5 | 5 | use Flynt\Utils\Asset; |
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=ListSocial', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=ListSocial', function($data) { |
|
9 | 9 | Component::enqueueAssets('ListSocial'); |
10 | 10 | |
11 | 11 | if (!empty($data['social'])) { |
12 | - $data['social'] = array_map(function ($item) { |
|
12 | + $data['social'] = array_map(function($item) { |
|
13 | 13 | $item['icon'] = Asset::getContents("Components/ListSocial/Assets/{$item['platform']}.svg"); |
14 | 14 | return $item; |
15 | 15 | }, $data['social']); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Features\Components\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=HeroImageText', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=HeroImageText', function($data) { |
|
8 | 8 | Component::enqueueAssets('HeroImageText'); |
9 | 9 | |
10 | 10 | return $data; |
@@ -5,7 +5,7 @@ |
||
5 | 5 | use Timber\Timber; |
6 | 6 | use Timber\Post; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=ListPostCards', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=ListPostCards', function($data) { |
|
9 | 9 | Component::enqueueAssets('ListPostCards'); |
10 | 10 | |
11 | 11 | $posts = Timber::get_posts([ |