Completed
Push — componentlibrary_streamline-ph... ( b068c1...d1102b )
by Doğa
01:43
created
inc/theme.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-add_action('after_setup_theme', function () {
3
+add_action('after_setup_theme', function() {
4 4
     add_theme_support('title-tag');
5 5
     add_theme_support('post-thumbnails');
6 6
 });
Please login to merge, or discard this patch.
Components/NavigationMain/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 use Timber\Menu;
6 6
 use Flynt\Utils\Asset;
7 7
 
8
-add_action('init', function () {
8
+add_action('init', function() {
9 9
     register_nav_menus([
10 10
         'navigation_main' => __('Navigation Main', 'flynt-starter-theme')
11 11
     ]);
12 12
 });
13 13
 
14
-add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) {
14
+add_filter('Flynt/addComponentData?name=NavigationMain', function($data) {
15 15
     $data['maxLevel'] = 0;
16 16
     $data['menu'] = new Menu('navigation_main');
17 17
 
Please login to merge, or discard this patch.
Components/NavigationFooter/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -4,13 +4,13 @@
 block discarded – undo
4 4
 
5 5
 use Timber\Menu;
6 6
 
7
-add_action('init', function () {
7
+add_action('init', function() {
8 8
     register_nav_menus([
9 9
         'navigation_footer' => __('Navigation Footer', 'flynt-starter-theme')
10 10
     ]);
11 11
 });
12 12
 
13
-add_filter('Flynt/addComponentData?name=NavigationFooter', function ($data) {
13
+add_filter('Flynt/addComponentData?name=NavigationFooter', function($data) {
14 14
     $data['maxLevel'] = 0;
15 15
     $data['menu'] = new Menu('navigation_footer');
16 16
 
Please login to merge, or discard this patch.
inc/assets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 use Flynt\Utils\Asset;
4 4
 
5
-add_action('wp_enqueue_scripts', function () {
5
+add_action('wp_enqueue_scripts', function() {
6 6
     Asset::register([
7 7
         'name' => 'vendor',
8 8
         'type' => 'script',
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     }
65 65
 });
66 66
 
67
-add_action('admin_enqueue_scripts', function () {
67
+add_action('admin_enqueue_scripts', function() {
68 68
     Asset::register([
69 69
         'name' => 'vendorAdmin',
70 70
         'type' => 'script',
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
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             acf_add_local_field_group($fieldGroup);
88 88
         }
89 89
 
90
-        add_action('current_screen', function ($currentScreen) {
90
+        add_action('current_screen', function($currentScreen) {
91 91
             foreach (static::OPTION_TYPES as $optionType => $option) {
92 92
                 $isTranslatable = $option['translatable'];
93 93
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                     add_filter('acf/settings/current_language', 'Flynt\Utils\Options::getDefaultAcfLanguage', 101);
102 102
 
103 103
                     // hide language selector in admin bar
104
-                    add_action('wp_before_admin_bar_render', function () {
104
+                    add_action('wp_before_admin_bar_render', function() {
105 105
                         $adminBar = $GLOBALS['wp_admin_bar'];
106 106
                         $adminBar->remove_menu('WPML_ALS');
107 107
                     });
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             $optionNames = (((static::$registeredOptions[$optionType] ?? [])[lcfirst($optionCategory)] ?? [])[$subPageName] ?? []);
152 152
             return array_combine(
153 153
                 $optionNames,
154
-                array_map(function ($optionName) use ($prefix, $isTranslatable) {
154
+                array_map(function($optionName) use ($prefix, $isTranslatable) {
155 155
                     $fieldKey = $prefix . $optionName;
156 156
                     return static::getOptionField($fieldKey, $isTranslatable);
157 157
                 }, $optionNames)
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 
236 236
     protected static function prefixFields($fields, $prefix)
237 237
     {
238
-        return array_map(function ($field) use ($prefix) {
238
+        return array_map(function($field) use ($prefix) {
239 239
             $field['name'] = $prefix . '_' . $field['name'];
240 240
             return $field;
241 241
         }, $fields);
Please login to merge, or discard this patch.
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/afterRegisterComponents', function () {
9
+add_action('Flynt/afterRegisterComponents', function() {
10 10
     if ((WP_ENV === 'development' || current_user_can('editor') || current_user_can('administrator')) && isset($_GET['log'])) {
11 11
         if (isset($_GET['component']) && !empty($_GET['component'])) {
12 12
             define(__NAMESPACE__ . '\COMPONENT_WHITELIST', explode(',', $_GET['component']));
@@ -32,21 +32,21 @@  discard block
 block discarded – undo
32 32
 {
33 33
     $type = gettype($data);
34 34
     $output = json_encode($data);
35
-    $result =  "<script>console.log({$output});</script>\n";
35
+    $result = "<script>console.log({$output});</script>\n";
36 36
     echoDebug($result, $postpone);
37 37
 }
38 38
 
39 39
 function consoleTable($data, $postpone = true)
40 40
 {
41 41
     $output = json_encode($data);
42
-    $result =  "<script>console.table({$output});</script>\n";
42
+    $result = "<script>console.table({$output});</script>\n";
43 43
     echoDebug($result, $postpone);
44 44
 }
45 45
 
46 46
 function echoDebug($data, $postpone)
47 47
 {
48 48
     if ($postpone) {
49
-        add_action('wp_footer', function () use ($data) {
49
+        add_action('wp_footer', function() use ($data) {
50 50
             echo $data;
51 51
         }, 30);
52 52
     } else {
Please login to merge, or discard this patch.
Components/ListSearchResults/functions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 use Flynt\Utils\Options;
7 7
 use Timber\Timber;
8 8
 
9
-add_filter('Flynt/addComponentData?name=ListSearchResults', function ($data) {
9
+add_filter('Flynt/addComponentData?name=ListSearchResults', function($data) {
10 10
     $data['prevIcon'] = Asset::getContents('Components/ListSearchResults/Assets/navigation-prev.svg');
11 11
     $data['nextIcon'] = Asset::getContents('Components/ListSearchResults/Assets/navigation-next.svg');
12 12
     $data['searchIcon'] = Asset::getContents('Components/ListSearchResults/Assets/search.svg');
Please login to merge, or discard this patch.
Features/TimberLoader/functions.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 // Convert ACF Field of type relationship to a Timber\Post and add all ACF Fields of that Post
24 24
 add_filter('acf/format_value/type=relationship', NS . 'formatPostObject', 100);
25
-add_filter('get_twig', function ($twig) {
25
+add_filter('get_twig', function($twig) {
26 26
     $twig->addExtension(new TwigExtensionFlynt());
27 27
     return $twig;
28 28
 });
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 function formatGallery($value)
39 39
 {
40 40
     if (!empty($value)) {
41
-        $value = array_map(function ($image) {
41
+        $value = array_map(function($image) {
42 42
             return new Image($image);
43 43
         }, $value);
44 44
     }
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
     return $value;
64 64
 }
65 65
 
66
-add_action('timber/twig/filters', function ($twig) {
67
-    $twig->addFunction(new \Twig_SimpleFunction('placeholderImage', function ($width, $height, $color = null) {
66
+add_action('timber/twig/filters', function($twig) {
67
+    $twig->addFunction(new \Twig_SimpleFunction('placeholderImage', function($width, $height, $color = null) {
68 68
         $width = round($width);
69 69
         $height = round($height);
70 70
         $colorRect = $color ? "<rect width='{$width}' height='{$height}' style='fill:$color' />" : '';
Please login to merge, or discard this patch.
lib/ComponentManager.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,20 +15,20 @@
 block discarded – undo
15 15
         return self::$instance;
16 16
     }
17 17
 
18
-  /**
19
-   * clone
20
-   *
21
-   * Prevent cloning with 'protected' keyword
22
-  **/
18
+    /**
19
+     * clone
20
+     *
21
+     * Prevent cloning with 'protected' keyword
22
+     **/
23 23
     protected function __clone()
24 24
     {
25 25
     }
26 26
 
27
-  /**
28
-   * constructor
29
-   *
30
-   * Prevent instantiation with 'protected' keyword
31
-  **/
27
+    /**
28
+     * constructor
29
+     *
30
+     * Prevent instantiation with 'protected' keyword
31
+     **/
32 32
     protected function __construct()
33 33
     {
34 34
     }
Please login to merge, or discard this patch.