Completed
Push — componentlibrary ( d0ffcc...c716ac )
by
unknown
01:48
created
Features/ComponentLogServer/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
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'])) {
@@ -43,21 +43,21 @@  discard block
 block discarded – undo
43 43
 {
44 44
     $type = gettype($data);
45 45
     $output = json_encode($data);
46
-    $result =  "<script>console.log({$output});</script>\n";
46
+    $result = "<script>console.log({$output});</script>\n";
47 47
     echoDebug($result, $postpone);
48 48
 }
49 49
 
50 50
 function consoleTable($data, $postpone = true)
51 51
 {
52 52
     $output = json_encode($data);
53
-    $result =  "<script>console.table({$output});</script>\n";
53
+    $result = "<script>console.table({$output});</script>\n";
54 54
     echoDebug($result, $postpone);
55 55
 }
56 56
 
57 57
 function echoDebug($data, $postpone)
58 58
 {
59 59
     if ($postpone) {
60
-        add_action('wp_footer', function () use ($data) {
60
+        add_action('wp_footer', function() use ($data) {
61 61
             echo $data;
62 62
         }, 30);
63 63
     } else {
Please login to merge, or discard this patch.
Features/Acf/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 
16 16
 add_action('Flynt/afterRegisterFeatures', 'Flynt\Features\Acf\Loader::init');
17 17
 
18
-add_filter('pre_http_request', function ($preempt, $args, $url) {
18
+add_filter('pre_http_request', function($preempt, $args, $url) {
19 19
     if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) {
20 20
         $response = wp_cache_get($url, 'oembedCache');
21 21
         if (!empty($response)) {
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     return false;
26 26
 }, 10, 3);
27 27
 
28
-add_filter('http_response', function ($response, $args, $url) {
28
+add_filter('http_response', function($response, $args, $url) {
29 29
     if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) {
30 30
         wp_cache_set($url, $response, 'oembedCache');
31 31
     }
Please login to merge, or discard this patch.
Components/BlockWysiwyg/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockWysiwyg', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockWysiwyg', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockWysiwyg');
10 10
     });
11 11
 
Please login to merge, or discard this patch.
Components/BlockNotFound/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockNotFound', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockNotFound', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockNotFound');
10 10
     });
11 11
 
Please login to merge, or discard this patch.
Components/BlockImageText/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockImageText', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockImageText', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockImageText');
10 10
     });
11 11
 
Please login to merge, or discard this patch.
Components/BlockImage/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockImage', function ($data) {
8
-    add_action('wp_enqueue_scripts', function () {
7
+add_filter('Flynt/addComponentData?name=BlockImage', function($data) {
8
+    add_action('wp_enqueue_scripts', function() {
9 9
         Component::enqueueAssets('BlockImage');
10 10
     });
11 11
 
Please login to merge, or discard this patch.
Components/NavigationFooter/functions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,14 +5,14 @@
 block discarded – undo
5 5
 use Flynt\Features\Components\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) {
15
-    add_action('wp_enqueue_scripts', function () {
14
+add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) {
15
+    add_action('wp_enqueue_scripts', function() {
16 16
         Component::enqueueAssets('NavigationFooter');
17 17
     });
18 18
 
Please login to merge, or discard this patch.
Features/Acf/FlexibleContentToggle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         if (is_admin()) {
16 16
             // adds buttons to collapse/expand components
17
-            add_filter('acf/get_field_label', function ($label, $field) {
17
+            add_filter('acf/get_field_label', function($label, $field) {
18 18
                 if ($field['type'] === 'flexible_content') {
19 19
                     $label .= '<span class="flexible-content-controls">';
20 20
                     $label .= '<span class="flexible-content-control"><a class="acf-icon small -collapse collapse-all" title="collapse all"></a></span>';
Please login to merge, or discard this patch.
Components/ListComponents/functions.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@  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) {
10
-    add_action('wp_enqueue_scripts', function () {
9
+add_filter('Flynt/addComponentData?name=ListComponents', function($data) {
10
+    add_action('wp_enqueue_scripts', function() {
11 11
         Component::enqueueAssets('ListComponents');
12 12
     });
13 13
 
14 14
     if (!empty($data['componentBlocks'])) {
15
-        $data['componentBlocks'] = array_map(function ($block) {
15
+        $data['componentBlocks'] = array_map(function($block) {
16 16
             $componentPaths = explode('/', $block['component']);
17
-            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3));
17
+            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3));
18 18
 
19
-            if (file_exists(Asset::requirePath($block['component']."preview-desktop.jpg"))) {
20
-                $block['componentPreviewDesktopUrl'] = Asset::requireUrl($block['component']."preview-desktop.jpg");
19
+            if (file_exists(Asset::requirePath($block['component'] . "preview-desktop.jpg"))) {
20
+                $block['componentPreviewDesktopUrl'] = Asset::requireUrl($block['component'] . "preview-desktop.jpg");
21 21
             }
22 22
 
23
-            if (file_exists(Asset::requirePath($block['component']."preview-mobile.jpg"))) {
24
-                $block['componentPreviewMobileUrl'] = Asset::requireUrl($block['component']."preview-mobile.jpg");
23
+            if (file_exists(Asset::requirePath($block['component'] . "preview-mobile.jpg"))) {
24
+                $block['componentPreviewMobileUrl'] = Asset::requireUrl($block['component'] . "preview-mobile.jpg");
25 25
             }
26
-            $readme = Asset::requirePath($block['component']."README.md");
26
+            $readme = Asset::requirePath($block['component'] . "README.md");
27 27
 
28 28
             if (file_exists($readme)) {
29 29
                 $block['readme'] = parsePreviewContent(file_get_contents($readme));
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 });
38 38
 
39 39
 
40
-add_filter('acf/load_field/name=component', function ($field) {
40
+add_filter('acf/load_field/name=component', function($field) {
41 41
     $componentManager = ComponentManager::getInstance();
42 42
     $field['choices'] = array_flip($componentManager->getAll());
43 43
     return $field;
Please login to merge, or discard this patch.