Completed
Push — constructionplanless ( cb84a3...5132cc )
by Dominik
01:29
created
inc/fieldGroups/pageComponents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use ACFComposer\ACFComposer;
4 4
 
5
-add_action('acf/init', function () {
5
+add_action('acf/init', function() {
6 6
     ACFComposer::registerFieldGroup([
7 7
         'name' => 'pageComponents',
8 8
         '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
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use ACFComposer\ACFComposer;
4 4
 
5
-add_action('acf/init', function () {
5
+add_action('acf/init', function() {
6 6
     ACFComposer::registerFieldGroup([
7 7
         'name' => 'postComponents',
8 8
         'title' => 'Post Components',
Please login to merge, or discard this patch.
Features/Acf/OptionPages.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         self::createOptionPages();
72 72
 
73 73
         // Register Categories
74
-        add_action('acf/init', function () {
74
+        add_action('acf/init', function() {
75 75
             self::addComponentSubPages();
76 76
             self::addFeatureSubPages();
77 77
             // self::addCustomPostTypeSubPages();
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     public static function addComponentData($data, $parentData, $config)
150 150
     {
151 151
         // get fields for this component
152
-        $options = array_reduce(array_keys(self::$optionTypes), function ($carry, $optionType) use ($config) {
152
+        $options = array_reduce(array_keys(self::$optionTypes), function($carry, $optionType) use ($config) {
153 153
             return array_merge($carry, self::get($optionType, 'Component', $config['name']));
154 154
         }, []);
155 155
 
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             ];
218 218
         }
219 219
 
220
-        add_action('current_screen', function ($currentScreen) {
220
+        add_action('current_screen', function($currentScreen) {
221 221
             foreach (self::$optionTypes as $optionType => $option) {
222 222
                 $isTranslatable = $option['translatable'];
223 223
                 $toplevelPageId = 'toplevel_page_' . $optionType;
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                     add_filter('acf/settings/current_language', 'Flynt\Features\Acf\OptionPages::getDefaultAcfLanguage', 101);
232 232
 
233 233
                     // hide language selector in admin bar
234
-                    add_action('wp_before_admin_bar_render', function () {
234
+                    add_action('wp_before_admin_bar_render', function() {
235 235
                         $adminBar = $GLOBALS['wp_admin_bar'];
236 236
                         $adminBar->remove_menu('WPML_ALS');
237 237
                     });
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 
330 330
     protected static function prefixFields($fields, $prefix)
331 331
     {
332
-        return array_map(function ($field) use ($prefix) {
332
+        return array_map(function($field) use ($prefix) {
333 333
             $field['name'] = $prefix . '_' . $field['name'];
334 334
             return $field;
335 335
         }, $fields);
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     protected static function collectOptionsWithPrefix($options, $prefix)
394 394
     {
395 395
         $optionKeys = is_array($options) ? array_keys($options) : [];
396
-        return array_reduce($optionKeys, function ($carry, $key) use ($options, $prefix) {
396
+        return array_reduce($optionKeys, function($carry, $key) use ($options, $prefix) {
397 397
             $count = 0;
398 398
             $option = $options[$key];
399 399
             $key = str_replace($prefix, '', $key, $count);
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 
407 407
     protected static function combineArrayDefaults(array $array, array $defaults)
408 408
     {
409
-        return array_map(function ($value) use ($defaults) {
409
+        return array_map(function($value) use ($defaults) {
410 410
             return is_array($value) ? array_merge($defaults, $value) : [];
411 411
         }, $array);
412 412
     }
Please login to merge, or discard this patch.
Features/TimberLoader/functions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 // Convert ACF Field of type post_object to a Timber\Post and add all ACF Fields of that Post
21 21
 add_filter('acf/format_value/type=post_object', NS . 'formatPostObject', 100);
22 22
 
23
-add_filter('get_twig', function ($twig) {
23
+add_filter('get_twig', function($twig) {
24 24
     $twig->addExtension(new TwigExtensionFlynt());
25 25
     return $twig;
26 26
 });
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 function formatGallery($value)
37 37
 {
38 38
     if (!empty($value)) {
39
-        $value = array_map(function ($image) {
39
+        $value = array_map(function($image) {
40 40
             return new Image($image);
41 41
         }, $value);
42 42
     }
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
     return $value;
62 62
 }
63 63
 
64
-add_action('timber/twig/filters', function ($twig) {
65
-    $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function ($aspect, $r = 0, $g = 0, $b = 0, $a = 127) {
64
+add_action('timber/twig/filters', function($twig) {
65
+    $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function($aspect, $r = 0, $g = 0, $b = 0, $a = 127) {
66 66
         $ratio = aspectToRatio($aspect);
67 67
         //create image with specified sizes
68 68
         $image = imagecreatetruecolor($ratio['width'], $ratio['height']);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     $k2 = 1;
92 92
     $b = 1 / $n;
93 93
     do {
94
-        $b = 1/$b;
94
+        $b = 1 / $b;
95 95
         $a = floor($b);
96 96
         $aux = $h1;
97 97
         $h1 = $a * $h1 + $h2;
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
     return crypt(serialize($args), NONCE_SALT);
114 114
 }
115 115
 
116
-add_action('timber/twig/filters', function ($twig) {
117
-    $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) {
116
+add_action('timber/twig/filters', function($twig) {
117
+    $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) {
118 118
         $arguments = [
119 119
             'src' => $src,
120 120
             'w' => $w,
Please login to merge, or discard this patch.
inc/Bootstrap.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
     public static function setTemplateDirectory()
8 8
     {
9
-        add_action('after_switch_theme', function () {
9
+        add_action('after_switch_theme', function() {
10 10
             $stylesheet = get_option('stylesheet');
11 11
 
12 12
             if (basename($stylesheet) !== 'templates') {
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
             }
15 15
         });
16 16
 
17
-        add_filter('stylesheet', function ($stylesheet) {
17
+        add_filter('stylesheet', function($stylesheet) {
18 18
             return dirname($stylesheet);
19 19
         });
20 20
     }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         }
34 34
 
35 35
         if (!$acfActive || !$flyntCoreActive) {
36
-            add_filter('template_include', function () {
36
+            add_filter('template_include', function() {
37 37
                 die(
38 38
                     'One or more required plugins are not activated! Please <a href="'
39 39
                     . esc_url(admin_url('plugins.php'))
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     protected static function notifyRequiredPluginIsMissing($pluginName)
49 49
     {
50
-        add_action('admin_notices', function () use ($pluginName) {
50
+        add_action('admin_notices', function() use ($pluginName) {
51 51
             echo "<div class=\"error\"><p>${pluginName} Plugin not activated. Make sure you activate the plugin on the <a href=\""
52 52
                 . esc_url(admin_url('plugins.php')) . "\">plugin page</a>.</p></div>";
53 53
         });
Please login to merge, or discard this patch.
inc/assets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 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' => 'console-polyfill',
8 8
         'type' => 'script',
Please login to merge, or discard this patch.