@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | use Flynt\Utils\Asset; |
5 | 5 | use function Flynt\Features\TimberLoader\renderTwigIndex; |
6 | 6 | |
7 | -add_filter('get_twig', function ($twig) { |
|
7 | +add_filter('get_twig', function($twig) { |
|
8 | 8 | $twig->addFunction(new Twig_SimpleFunction('renderComponent', 'renderComponent')); |
9 | 9 | |
10 | - $twig->addFunction(new Twig_SimpleFunction('renderFlexibleContent', function ($fcField) { |
|
11 | - return implode('', array_map(function ($field) { |
|
10 | + $twig->addFunction(new Twig_SimpleFunction('renderFlexibleContent', function($fcField) { |
|
11 | + return implode('', array_map(function($field) { |
|
12 | 12 | return renderComponent(ucfirst($field['acf_fc_layout']), $field); |
13 | 13 | }, $fcField)); |
14 | 14 | })); |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | return $twig; |
17 | 17 | }); |
18 | 18 | |
19 | -function renderComponent ($name, $data = []) |
|
19 | +function renderComponent($name, $data = []) |
|
20 | 20 | { |
21 | 21 | $data = apply_filters( |
22 | 22 | 'Flynt/addComponentData', |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | return renderTwigIndex(null, $name, $data, null); |
39 | 39 | }; |
40 | 40 | |
41 | -add_action('after_setup_theme', function () { |
|
41 | +add_action('after_setup_theme', function() { |
|
42 | 42 | new Timber\Timber(); |
43 | 43 | }); |
44 | 44 | |
45 | -add_action('wp_enqueue_scripts', function () { |
|
45 | +add_action('wp_enqueue_scripts', function() { |
|
46 | 46 | Asset::register([ |
47 | 47 | 'name' => 'console-polyfill', |
48 | 48 | 'type' => 'script', |