Completed
Push — componentlibrary ( 31509a...4ad37e )
by
unknown
01:31
created
Components/BlockImage/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;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockImage', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockImage', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.
Components/GridListSteps/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;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridListSteps', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridListSteps', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
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
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt;
6 6
 use Flynt\Utils\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=ListPosts', function ($data) {
8
+add_filter('Flynt/addComponentData?name=ListPosts', function($data) {
9 9
     return $data;
10 10
 });
11 11
 
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;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockWysiwyg', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockWysiwyg', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.
Components/SliderImageGallery/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt;
6 6
 use Flynt\Utils\Component;
7 7
 
8
-add_filter('Flynt/addComponentData?name=SliderImageGallery', function ($data) {
8
+add_filter('Flynt/addComponentData?name=SliderImageGallery', function($data) {
9 9
     Component::enqueueAssets('SliderImageGallery', [
10 10
         [
11 11
             'name' => 'slick-carousel',
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
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Flynt;
6 6
 use Flynt\Utils\Options;
7 7
 
8
-add_filter('Flynt/addComponentData?name=GridPosts', function ($data) {
8
+add_filter('Flynt/addComponentData?name=GridPosts', function($data) {
9 9
     return $data;
10 10
 }, 10, 2);
11 11
 
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;
6 6
 
7
-add_filter('Flynt/addComponentData?name=AccordionDefault', function ($data) {
7
+add_filter('Flynt/addComponentData?name=AccordionDefault', function($data) {
8 8
     return $data;
9 9
 });
10 10
 
Please login to merge, or discard this patch.
Components/ListComponents/functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,11 +6,11 @@  discard block
 block discarded – undo
6 6
 use Flynt\ComponentManager;
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
     if (!empty($data['componentBlocks'])) {
11
-        $data['componentBlocks'] = array_map(function ($block) {
11
+        $data['componentBlocks'] = array_map(function($block) {
12 12
             $componentPaths = explode('/', $block['component']);
13
-            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths)-3, 3));
13
+            $block['component'] = implode('/', array_slice($componentPaths, count($componentPaths) - 3, 3));
14 14
 
15 15
             if (file_exists(Asset::requirePath($block['component'] . 'preview-desktop.jpg'))) {
16 16
                 $src = Asset::requireUrl($block['component'] . 'preview-desktop.jpg');
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
                 ];
23 23
             }
24 24
 
25
-            if (file_exists(Asset::requirePath($block['component']."preview-mobile.jpg"))) {
25
+            if (file_exists(Asset::requirePath($block['component'] . "preview-mobile.jpg"))) {
26 26
                 $src = Asset::requireUrl($block['component'] . 'preview-mobile.jpg');
27 27
                 list($width, $height) = getimagesize(Asset::requirePath($block['component'] . 'preview-mobile.jpg'));
28 28
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 });
46 46
 
47 47
 
48
-add_filter('acf/load_field/name=component', function ($field) {
48
+add_filter('acf/load_field/name=component', function($field) {
49 49
     $componentManager = ComponentManager::getInstance();
50 50
     $field['choices'] = array_flip($componentManager->getAll());
51 51
     return $field;
Please login to merge, or discard this patch.
lib/Utils/Options.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             acf_add_local_field_group($fieldGroup);
86 86
         }
87 87
 
88
-        add_action('current_screen', function ($currentScreen) {
88
+        add_action('current_screen', function($currentScreen) {
89 89
             foreach (static::OPTION_TYPES as $optionType => $option) {
90 90
                 $isTranslatable = $option['translatable'];
91 91
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
                     add_filter('acf/settings/current_language', 'Flynt\Utils\Options::getDefaultAcfLanguage', 101);
100 100
 
101 101
                     // hide language selector in admin bar
102
-                    add_action('wp_before_admin_bar_render', function () {
102
+                    add_action('wp_before_admin_bar_render', function() {
103 103
                         $adminBar = $GLOBALS['wp_admin_bar'];
104 104
                         $adminBar->remove_menu('WPML_ALS');
105 105
                     });
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
     protected static function prefixFields($fields, $prefix)
220 220
     {
221
-        return array_map(function ($field) use ($prefix) {
221
+        return array_map(function($field) use ($prefix) {
222 222
             $field['name'] = $prefix . '_' . $field['name'];
223 223
             return $field;
224 224
         }, $fields);
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
     protected static function collectOptionsWithPrefix($options, $prefix)
283 283
     {
284 284
         $optionKeys = is_array($options) ? array_keys($options) : [];
285
-        return array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) {
285
+        return array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) {
286 286
             $count = 0;
287 287
             $option = $options[$key];
288 288
             $key = str_replace($prefix, '', $key, $count);
Please login to merge, or discard this patch.