@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Utils\Component; |
| 6 | 6 | use Flynt; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=GridListSteps', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=GridListSteps', function($data) { |
|
| 9 | 9 | Component::enqueueAssets('GridListSteps'); |
| 10 | 10 | |
| 11 | 11 | return $data; |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Utils\Component; |
| 6 | 6 | use Flynt; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=BlockImage', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=BlockImage', function($data) { |
|
| 9 | 9 | Component::enqueueAssets('BlockImage'); |
| 10 | 10 | |
| 11 | 11 | return $data; |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Utils\Component; |
| 6 | 6 | use Flynt; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=SliderImages', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=SliderImages', function($data) { |
|
| 9 | 9 | Component::enqueueAssets('SliderImages', [ |
| 10 | 10 | [ |
| 11 | 11 | 'name' => 'slick-carousel', |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Utils\Component; |
| 6 | 6 | use Flynt; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=SliderImageGallery', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=SliderImageGallery', function($data) { |
|
| 9 | 9 | Component::enqueueAssets('SliderImageGallery', [ |
| 10 | 10 | [ |
| 11 | 11 | 'name' => 'slick-carousel', |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flynt\Utils\Component; |
| 6 | 6 | use Flynt\Utils\Options; |
| 7 | 7 | |
| 8 | -add_filter('Flynt/addComponentData?name=BlockCookieNotice', function ($data) { |
|
| 8 | +add_filter('Flynt/addComponentData?name=BlockCookieNotice', function($data) { |
|
| 9 | 9 | Component::enqueueAssets('BlockCookieNotice'); |
| 10 | 10 | |
| 11 | 11 | return $data; |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use ACFComposer\ACFComposer; |
| 4 | 4 | |
| 5 | -add_action('Flynt/afterRegisterComponents', function () { |
|
| 5 | +add_action('Flynt/afterRegisterComponents', function() { |
|
| 6 | 6 | ACFComposer::registerFieldGroup([ |
| 7 | 7 | 'name' => 'postComponents', |
| 8 | 8 | 'title' => 'Post Components', |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use ACFComposer\ACFComposer; |
| 4 | 4 | |
| 5 | -add_action('Flynt/afterRegisterComponents', function () { |
|
| 5 | +add_action('Flynt/afterRegisterComponents', function() { |
|
| 6 | 6 | ACFComposer::registerFieldGroup([ |
| 7 | 7 | 'name' => 'pageComponents', |
| 8 | 8 | 'title' => 'Page Components', |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | return is_null($output) ? '' : $output; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | -add_filter('Flynt/renderComponent', function ($output, $componentName, $data) { |
|
| 47 | +add_filter('Flynt/renderComponent', function($output, $componentName, $data) { |
|
| 48 | 48 | return apply_filters( |
| 49 | 49 | "Flynt/renderComponent?name={$componentName}", |
| 50 | 50 | $output, |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | ); |
| 54 | 54 | }, 10, 3); |
| 55 | 55 | |
| 56 | -add_filter('Flynt/addComponentData', function ($data, $componentName) { |
|
| 56 | +add_filter('Flynt/addComponentData', function($data, $componentName) { |
|
| 57 | 57 | return apply_filters( |
| 58 | 58 | "Flynt/addComponentData?name={$componentName}", |
| 59 | 59 | $data, |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | use Flynt; |
| 9 | 9 | use Timber\Image; |
| 10 | 10 | |
| 11 | -add_filter('Flynt/addComponentData?name=ListComponents', function ($data) { |
|
| 11 | +add_filter('Flynt/addComponentData?name=ListComponents', function($data) { |
|
| 12 | 12 | Component::enqueueAssets('ListComponents'); |
| 13 | 13 | |
| 14 | 14 | if (!empty($data['componentBlocks'])) { |
| 15 | - $data['componentBlocks'] = array_map(function ($block) { |
|
| 15 | + $data['componentBlocks'] = array_map(function($block) { |
|
| 16 | 16 | $componentPaths = explode('/', $block['component']); |
| 17 | - $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3)); |
|
| 17 | + $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3)); |
|
| 18 | 18 | |
| 19 | 19 | if (file_exists(Asset::requirePath($block['component'] . 'preview-desktop.jpg'))) { |
| 20 | 20 | $src = Asset::requireUrl($block['component'] . 'preview-desktop.jpg'); |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | ]; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - if (file_exists(Asset::requirePath($block['component']."preview-mobile.jpg"))) { |
|
| 29 | + if (file_exists(Asset::requirePath($block['component'] . "preview-mobile.jpg"))) { |
|
| 30 | 30 | $src = Asset::requireUrl($block['component'] . 'preview-mobile.jpg'); |
| 31 | 31 | list($width, $height) = getimagesize(Asset::requirePath($block['component'] . 'preview-mobile.jpg')); |
| 32 | 32 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | }); |
| 50 | 50 | |
| 51 | 51 | |
| 52 | -add_filter('acf/load_field/name=component', function ($field) { |
|
| 52 | +add_filter('acf/load_field/name=component', function($field) { |
|
| 53 | 53 | $componentManager = ComponentManager::getInstance(); |
| 54 | 54 | $field['choices'] = array_flip($componentManager->getAll()); |
| 55 | 55 | return $field; |