@@ -6,15 +6,15 @@ |
||
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | use WP_Query; |
8 | 8 | |
9 | -add_action('wp_enqueue_scripts', function () { |
|
9 | +add_action('wp_enqueue_scripts', function() { |
|
10 | 10 | Component::enqueueAssets('LayoutMultiplePosts'); |
11 | 11 | }); |
12 | 12 | |
13 | -add_filter('Flynt/addComponentData?name=LayoutMultiplePosts', function ($data) { |
|
13 | +add_filter('Flynt/addComponentData?name=LayoutMultiplePosts', function($data) { |
|
14 | 14 | $query = !empty($data['query']) ? $data['query'] : false; |
15 | 15 | $posts = Timber::get_posts($query); |
16 | 16 | if (!empty($posts)) { |
17 | - $posts = array_map(function ($post) { |
|
17 | + $posts = array_map(function($post) { |
|
18 | 18 | $fields = get_fields($post->id); |
19 | 19 | $post->fields = $fields === false ? [] : $fields; |
20 | 20 | return $post; |