@@ -5,8 +5,8 @@ |
||
5 | 5 | use Timber\Timber; |
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=LayoutSinglePost', function ($data) { |
|
9 | - add_action('wp_enqueue_scripts', function () { |
|
8 | +add_filter('Flynt/addComponentData?name=LayoutSinglePost', function($data) { |
|
9 | + add_action('wp_enqueue_scripts', function() { |
|
10 | 10 | Component::enqueueAssets('LayoutSinglePost'); |
11 | 11 | }); |
12 | 12 |
@@ -5,15 +5,15 @@ |
||
5 | 5 | use Timber\Timber; |
6 | 6 | use Flynt\Features\Components\Component; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=LayoutMultiplePosts', function ($data) { |
|
9 | - add_action('wp_enqueue_scripts', function () { |
|
8 | +add_filter('Flynt/addComponentData?name=LayoutMultiplePosts', function($data) { |
|
9 | + add_action('wp_enqueue_scripts', function() { |
|
10 | 10 | Component::enqueueAssets('LayoutMultiplePosts'); |
11 | 11 | }); |
12 | 12 | |
13 | 13 | $query = !empty($data['query']) ? $data['query'] : false; |
14 | 14 | $posts = Timber::get_posts($query); |
15 | 15 | if (!empty($posts)) { |
16 | - $posts = array_map(function ($post) { |
|
16 | + $posts = array_map(function($post) { |
|
17 | 17 | $fields = get_fields($post->id); |
18 | 18 | $post->fields = $fields === false ? [] : $fields; |
19 | 19 | return $post; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\'); |
8 | 8 | |
9 | -add_action('Flynt/afterRegisterFeatures', function () { |
|
9 | +add_action('Flynt/afterRegisterFeatures', function() { |
|
10 | 10 | $componentManager = Flynt\ComponentManager::getInstance(); |
11 | 11 | $componentWhitelist = []; |
12 | 12 | if (isset($_GET['component']) && !empty($_GET['component'])) { |
@@ -42,14 +42,14 @@ discard block |
||
42 | 42 | function consoleDebug($data, $postpone = true) |
43 | 43 | { |
44 | 44 | $output = json_encode($data); |
45 | - $result = "<script>console.log({$output});</script>\n"; |
|
45 | + $result = "<script>console.log({$output});</script>\n"; |
|
46 | 46 | echoDebug($result, $postpone); |
47 | 47 | } |
48 | 48 | |
49 | 49 | function echoDebug($data, $postpone) |
50 | 50 | { |
51 | 51 | if ($postpone) { |
52 | - add_action('wp_footer', function () use ($data) { |
|
52 | + add_action('wp_footer', function() use ($data) { |
|
53 | 53 | echo $data; |
54 | 54 | }, 30); |
55 | 55 | } else { |