Completed
Pull Request — componentlibrary (#305)
by Doğa
02:07 queued 18s
created
inc/fieldGroups/pageComponents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use ACFComposer\ACFComposer;
4 4
 use Flynt\Api;
5 5
 
6
-add_action('Flynt/afterRegisterComponents', function () {
6
+add_action('Flynt/afterRegisterComponents', function() {
7 7
     ACFComposer::registerFieldGroup([
8 8
         'name' => 'pageComponents',
9 9
         'title' => 'Page Components',
Please login to merge, or discard this patch.
inc/fieldGroups/postComponents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 use ACFComposer\ACFComposer;
4 4
 use Flynt\Api;
5 5
 
6
-add_action('Flynt/afterRegisterComponents', function () {
6
+add_action('Flynt/afterRegisterComponents', function() {
7 7
     ACFComposer::registerFieldGroup([
8 8
         'name' => 'postComponents',
9 9
         'title' => 'Post Components',
Please login to merge, or discard this patch.
lib/Api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
     public static function registerHooks()
81 81
     {
82
-        add_filter('Flynt/renderComponent', function ($output, $componentName, $data) {
82
+        add_filter('Flynt/renderComponent', function($output, $componentName, $data) {
83 83
             return apply_filters(
84 84
                 "Flynt/renderComponent?name={$componentName}",
85 85
                 $output,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             );
89 89
         }, 10, 3);
90 90
 
91
-        add_filter('Flynt/addComponentData', function ($data, $componentName) {
91
+        add_filter('Flynt/addComponentData', function($data, $componentName) {
92 92
             return apply_filters(
93 93
                 "Flynt/addComponentData?name={$componentName}",
94 94
                 $data,
Please login to merge, or discard this patch.
lib/Init.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     public static function setTemplateDirectory()
41 41
     {
42
-        add_action('after_switch_theme', function () {
42
+        add_action('after_switch_theme', function() {
43 43
             $stylesheet = get_option('stylesheet');
44 44
 
45 45
             if (basename($stylesheet) !== 'templates') {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             }
48 48
         });
49 49
 
50
-        add_filter('stylesheet', function ($stylesheet) {
50
+        add_filter('stylesheet', function($stylesheet) {
51 51
             return dirname($stylesheet);
52 52
         });
53 53
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         }
62 62
 
63 63
         if (!$acfActive) {
64
-            add_filter('template_include', function () {
64
+            add_filter('template_include', function() {
65 65
                 die(
66 66
                     'One or more required plugins are not activated! Please <a href="'
67 67
                     . esc_url(admin_url('plugins.php'))
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     protected static function notifyRequiredPluginIsMissing($pluginName)
77 77
     {
78
-        add_action('admin_notices', function () use ($pluginName) {
78
+        add_action('admin_notices', function() use ($pluginName) {
79 79
             echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\""
80 80
                 . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>";
81 81
         });
Please login to merge, or discard this patch.
Components/BlockVideoOembed/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\Api;
6 6
 use Flynt\Utils\Oembed;
7 7
 
8
-add_filter('Flynt/addComponentData?name=BlockVideoOembed', function ($data) {
8
+add_filter('Flynt/addComponentData?name=BlockVideoOembed', function($data) {
9 9
     $data['video'] = Oembed::setSrcAsDataAttribute(
10 10
         $data['oembed'],
11 11
         [
Please login to merge, or discard this patch.
Components/ListPostCards/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
 use Flynt\Api;
5 5
 use Timber\Timber;
6 6
 
7
-add_filter('Flynt/addComponentData?name=ListPostCards', function ($data) {
7
+add_filter('Flynt/addComponentData?name=ListPostCards', function($data) {
8 8
     $posts = Timber::get_posts([
9 9
         'post_type'         => 'post',
10 10
         'posts_per_page'    => 4,
Please login to merge, or discard this patch.
Components/GridPostsSlider/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\Api;
6 6
 use Timber\Timber;
7 7
 
8
-add_filter('Flynt/addComponentData?name=GridPostsSlider', function ($data) {
8
+add_filter('Flynt/addComponentData?name=GridPostsSlider', function($data) {
9 9
     $posts = Timber::get_posts([
10 10
         'post_type'         => 'post',
11 11
         'posts_per_page'    => -1,
Please login to merge, or discard this patch.
Components/ListSocial/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 use Flynt\Api;
6 6
 use Flynt\Utils\Asset;
7 7
 
8
-add_filter('Flynt/addComponentData?name=ListSocial', function ($data) {
8
+add_filter('Flynt/addComponentData?name=ListSocial', function($data) {
9 9
     if (!empty($data['social'])) {
10
-        $data['social'] = array_map(function ($item) {
10
+        $data['social'] = array_map(function($item) {
11 11
             $item['icon'] = Asset::getContents("Components/ListSocial/Assets/{$item['platform']}.svg");
12 12
             return $item;
13 13
         }, $data['social']);
Please login to merge, or discard this patch.
Components/GridDownloadPortrait/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Api;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) {
8 8
     if (!empty($data['items'])) {
9
-        $data['items'] = array_map(function ($item) {
9
+        $data['items'] = array_map(function($item) {
10 10
             if ($item['itemType'] === 'itemFile') {
11 11
                 $fileSize = filesize(get_attached_file($item['file']['id']));
12 12
                 $item['file']['fileSize'] = size_format($fileSize);
Please login to merge, or discard this patch.