@@ -5,7 +5,7 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt\Utils\Oembed; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=BlockMediaText', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=BlockMediaText', function($data) { |
|
9 | 9 | Component::enqueueAssets('BlockMediaText'); |
10 | 10 | if ($data['mediaType'] === 'oembedVideo') { |
11 | 11 | $data['oembedLazyLoad'] = Oembed::setSrcAsDataAttribute( |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Flynt\Utils\Oembed; |
7 | 7 | |
8 | -add_filter('Flynt/addComponentData?name=SliderMedia', function ($data) { |
|
8 | +add_filter('Flynt/addComponentData?name=SliderMedia', function($data) { |
|
9 | 9 | Component::enqueueAssets('SliderMedia', [ |
10 | 10 | [ |
11 | 11 | 'name' => 'slick-carousel', |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | ] |
20 | 20 | ]); |
21 | 21 | |
22 | - $data['mediaSlides'] = array_map(function ($item) { |
|
22 | + $data['mediaSlides'] = array_map(function($item) { |
|
23 | 23 | if ($item['mediaType'] == 'oembed') { |
24 | 24 | $item['image'] = $item['posterImage']; |
25 | 25 | $item['oembedLazyLoad'] = Oembed::setSrcAsDataAttribute( |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockImage', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockImage', function($data) { |
|
8 | 8 | Component::enqueueAssets('BlockImage'); |
9 | 9 | |
10 | 10 | return $data; |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=SliderImages', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=SliderImages', function($data) { |
|
8 | 8 | Component::enqueueAssets('SliderImages', [ |
9 | 9 | [ |
10 | 10 | 'name' => 'slick-carousel', |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=SliderImageGallery', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=SliderImageGallery', function($data) { |
|
8 | 8 | Component::enqueueAssets('SliderImageGallery', [ |
9 | 9 | [ |
10 | 10 | 'name' => 'slick-carousel', |
@@ -4,7 +4,7 @@ |
||
4 | 4 | |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockBaseStyle', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockBaseStyle', function($data) { |
|
8 | 8 | Component::enqueueAssets('BlockBaseStyle'); |
9 | 9 | return $data; |
10 | 10 | }); |
@@ -5,13 +5,13 @@ |
||
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | use Timber\Menu; |
7 | 7 | |
8 | -add_action('init', function () { |
|
8 | +add_action('init', function() { |
|
9 | 9 | register_nav_menus([ |
10 | 10 | 'navigation_footer' => __('Navigation Footer', 'flynt-starter-theme') |
11 | 11 | ]); |
12 | 12 | }); |
13 | 13 | |
14 | -add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) { |
|
14 | +add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) { |
|
15 | 15 | Component::enqueueAssets('NavigationFooter'); |
16 | 16 | |
17 | 17 | // set max level of the menu |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use Flynt\Features\Acf\OptionPages; |
5 | 5 | use Flynt\Utils\Component; |
6 | 6 | |
7 | -add_filter('Flynt/addComponentData?name=BlockCookieNotice', function ($data) { |
|
7 | +add_filter('Flynt/addComponentData?name=BlockCookieNotice', function($data) { |
|
8 | 8 | Component::enqueueAssets('BlockCookieNotice'); |
9 | 9 | |
10 | 10 | return $data; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | define(__NAMESPACE__ . '\NS', __NAMESPACE__ . '\\'); |
8 | 8 | |
9 | -add_action('Flynt/afterRegisterComponents', function () { |
|
9 | +add_action('Flynt/afterRegisterComponents', function() { |
|
10 | 10 | $componentManager = Flynt\ComponentManager::getInstance(); |
11 | 11 | $componentWhitelist = []; |
12 | 12 | if (isset($_GET['component']) && !empty($_GET['component'])) { |
@@ -41,21 +41,21 @@ discard block |
||
41 | 41 | { |
42 | 42 | $type = gettype($data); |
43 | 43 | $output = json_encode($data); |
44 | - $result = "<script>console.log({$output});</script>\n"; |
|
44 | + $result = "<script>console.log({$output});</script>\n"; |
|
45 | 45 | echoDebug($result, $postpone); |
46 | 46 | } |
47 | 47 | |
48 | 48 | function consoleTable($data, $postpone = true) |
49 | 49 | { |
50 | 50 | $output = json_encode($data); |
51 | - $result = "<script>console.table({$output});</script>\n"; |
|
51 | + $result = "<script>console.table({$output});</script>\n"; |
|
52 | 52 | echoDebug($result, $postpone); |
53 | 53 | } |
54 | 54 | |
55 | 55 | function echoDebug($data, $postpone) |
56 | 56 | { |
57 | 57 | if ($postpone) { |
58 | - add_action('wp_footer', function () use ($data) { |
|
58 | + add_action('wp_footer', function() use ($data) { |
|
59 | 59 | echo $data; |
60 | 60 | }, 30); |
61 | 61 | } else { |