Completed
Push — constructionplanless ( c6433a...a84d3d )
by Dominik
01:33
created
Components/GridDownloadPortrait/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) {
8 8
     Component::enqueueAssets('GridDownloadPortrait');
9 9
 
10 10
     if (!empty($data['items'])) {
11
-        $data['items'] = array_map(function ($item) {
11
+        $data['items'] = array_map(function($item) {
12 12
             if ($item['itemType'] === 'itemFile') {
13 13
                 $fileSize = filesize(get_attached_file($item['file']['id']));
14 14
                 $item['file']['fileSize'] = size_format($fileSize);
Please login to merge, or discard this patch.
Components/GridContentLists/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridContentLists', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridContentLists', function($data) {
8 8
     Component::enqueueAssets('GridContentLists');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.
Components/HeroCta/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=HeroCta', function ($data) {
7
+add_filter('Flynt/addComponentData?name=HeroCta', function($data) {
8 8
     Component::enqueueAssets('HeroCta');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.
Components/GridPosts/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridPosts', function ($data, $parentData) {
7
+add_filter('Flynt/addComponentData?name=GridPosts', function($data, $parentData) {
8 8
     Component::enqueueAssets('GridPosts');
9 9
 
10 10
     $data['pagination'] = (isset($parentData['pagination'])) ? $parentData['pagination'] : null;
Please login to merge, or discard this patch.
Components/BlockWysiwyg/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockWysiwyg', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockWysiwyg', function($data) {
8 8
     Component::enqueueAssets('BlockWysiwyg');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.
Components/ListPosts/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListPosts', function ($data, $parentData) {
7
+add_filter('Flynt/addComponentData?name=ListPosts', function($data, $parentData) {
8 8
     Component::enqueueAssets('ListPosts');
9 9
     $data['isArchive'] = is_home() || is_archive();
10 10
 
Please login to merge, or discard this patch.
Components/HeroImage/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=HeroImage', function ($data) {
7
+add_filter('Flynt/addComponentData?name=HeroImage', function($data) {
8 8
     Component::enqueueAssets('HeroImage', [
9 9
         [
10 10
             'name' => 'lazysizes',
Please login to merge, or discard this patch.
Components/AccordionDefault/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=AccordionDefault', function ($data) {
7
+add_filter('Flynt/addComponentData?name=AccordionDefault', function($data) {
8 8
     Component::enqueueAssets('AccordionDefault');
9 9
     return $data;
10 10
 });
Please login to merge, or discard this patch.
Components/ListComponents/functions.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -6,22 +6,22 @@  discard block
 block discarded – undo
6 6
 use Flynt\Features\Components\Component;
7 7
 use Flynt\Utils\Asset;
8 8
 
9
-add_filter('Flynt/addComponentData?name=ListComponents', function ($data) {
9
+add_filter('Flynt/addComponentData?name=ListComponents', function($data) {
10 10
     Component::enqueueAssets('ListComponents');
11 11
 
12 12
     if (!empty($data['componentBlocks'])) {
13
-        $data['componentBlocks'] = array_map(function ($block) {
13
+        $data['componentBlocks'] = array_map(function($block) {
14 14
             $componentPaths = explode('/', $block['component']);
15
-            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3));
15
+            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3));
16 16
 
17
-            if (file_exists(Asset::requirePath($block['component']."preview-desktop.jpg"))) {
18
-                $block['componentPreviewDesktopUrl'] = Asset::requireUrl($block['component']."preview-desktop.jpg");
17
+            if (file_exists(Asset::requirePath($block['component'] . "preview-desktop.jpg"))) {
18
+                $block['componentPreviewDesktopUrl'] = Asset::requireUrl($block['component'] . "preview-desktop.jpg");
19 19
             }
20 20
 
21
-            if (file_exists(Asset::requirePath($block['component']."preview-mobile.jpg"))) {
22
-                $block['componentPreviewMobileUrl'] = Asset::requireUrl($block['component']."preview-mobile.jpg");
21
+            if (file_exists(Asset::requirePath($block['component'] . "preview-mobile.jpg"))) {
22
+                $block['componentPreviewMobileUrl'] = Asset::requireUrl($block['component'] . "preview-mobile.jpg");
23 23
             }
24
-            $readme = Asset::requirePath($block['component']."README.md");
24
+            $readme = Asset::requirePath($block['component'] . "README.md");
25 25
 
26 26
             if (file_exists($readme)) {
27 27
                 $block['readme'] = parsePreviewContent(file_get_contents($readme));
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 });
36 36
 
37 37
 
38
-add_filter('acf/load_field/name=component', function ($field) {
38
+add_filter('acf/load_field/name=component', function($field) {
39 39
     $componentManager = ComponentManager::getInstance();
40 40
     $field['choices'] = array_flip($componentManager->getAll());
41 41
     return $field;
Please login to merge, or discard this patch.