Completed
Push — constructionplanless ( faea72...90876d )
by Dominik
01:30
created
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.
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/NavigationMain/functions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,19 +7,19 @@  discard block
 block discarded – undo
7 7
 use Timber\Menu;
8 8
 use Flynt\Features\Acf\OptionPages;
9 9
 
10
-add_action('wp_enqueue_scripts', function () {
10
+add_action('wp_enqueue_scripts', function() {
11 11
     Component::enqueueAssets('NavigationMain');
12 12
 });
13 13
 
14
-add_filter('Flynt/addComponentData?name=NavigationMain', function ($data) {
14
+add_filter('Flynt/addComponentData?name=NavigationMain', function($data) {
15 15
     // set max level of the menu
16 16
     $data['maxLevel'] = 0;
17 17
     $data['menuSlug'] = !empty($data['menuSlug']) ? $data['menuSlug'] : '';
18 18
     $data['menu'] = has_nav_menu($data['menuSlug']) ? new Menu($data['menuSlug']) : false;
19 19
 
20 20
     if (!empty($data['menu'])) {
21
-        $data['menu']->items = array_map(function ($item) {
22
-            $item->btnClasses = array_filter($item->classes, function ($class) {
21
+        $data['menu']->items = array_map(function($item) {
22
+            $item->btnClasses = array_filter($item->classes, function($class) {
23 23
                 return stripos(trim($class), 'btn') === 0;
24 24
             });
25 25
             $item->classes = array_diff($item->classes, $item->btnClasses);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     return $data;
33 33
 });
34 34
 
35
-add_action('init', function () {
35
+add_action('init', function() {
36 36
     register_nav_menus([
37 37
         'navigation_main' => __('Navigation Main', 'flynt-starter-theme')
38 38
     ]);
Please login to merge, or discard this patch.
Features/TimberLoader/functions.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
         return $output;
37 37
     }
38 38
 
39
-    $addArea = function ($twig) use ($areaHtml) {
39
+    $addArea = function($twig) use ($areaHtml) {
40 40
 
41
-        $twig->addFunction(new Twig_SimpleFunction('area', function ($areaName) use ($areaHtml) {
41
+        $twig->addFunction(new Twig_SimpleFunction('area', function($areaName) use ($areaHtml) {
42 42
             if (array_key_exists($areaName, $areaHtml)) {
43 43
                 return $areaHtml[$areaName];
44 44
             }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 
50 50
     add_filter('get_twig', $addArea);
51 51
 
52
-    $returnTimberPaths = function ($paths) use ($filePath) {
52
+    $returnTimberPaths = function($paths) use ($filePath) {
53 53
         array_unshift($paths, dirname($filePath));
54 54
         return $paths;
55 55
     };
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 function formatGallery($value)
77 77
 {
78 78
     if (!empty($value)) {
79
-        $value = array_map(function ($image) {
79
+        $value = array_map(function($image) {
80 80
             return new Image($image);
81 81
         }, $value);
82 82
     }
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
     return $value;
102 102
 }
103 103
 
104
-add_action('timber/twig/filters', function ($twig) {
105
-    $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function ($aspect, $r = 0, $g = 0, $b = 0, $a = 127) {
104
+add_action('timber/twig/filters', function($twig) {
105
+    $twig->addFunction(new \Twig_SimpleFunction('transparentPng', function($aspect, $r = 0, $g = 0, $b = 0, $a = 127) {
106 106
         $ratio = aspectToRatio($aspect);
107 107
         //create image with specified sizes
108 108
         $image = imagecreatetruecolor($ratio['width'], $ratio['height']);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
     $k2 = 1;
132 132
     $b = 1 / $n;
133 133
     do {
134
-        $b = 1/$b;
134
+        $b = 1 / $b;
135 135
         $a = floor($b);
136 136
         $aux = $h1;
137 137
         $h1 = $a * $h1 + $h2;
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
     return crypt(serialize($args), NONCE_SALT);
154 154
 }
155 155
 
156
-add_action('timber/twig/filters', function ($twig) {
157
-    $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function ($src, $w, $h = 0, $crop = 'default', $force = false) {
156
+add_action('timber/twig/filters', function($twig) {
157
+    $twig->addFilter(new \Twig_SimpleFilter('resizeDynamic', function($src, $w, $h = 0, $crop = 'default', $force = false) {
158 158
         $arguments = [
159 159
             'src' => $src,
160 160
             'w' => $w,
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,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridDownloadPortrait', function($data) {
8 8
     Component::enqueueAssets('GridDownloadPortrait');
9 9
 
10 10
     if (!empty($data['items'])) {
11
-        $data['items'] = array_map(function ($item) {
11
+        $data['items'] = array_map(function($item) {
12 12
             if ($item['itemType'] === 'itemFile') {
13 13
                 $fileSize = filesize(get_attached_file($item['file']['id']));
14 14
                 $item['file']['fileSize'] = size_format($fileSize);
Please login to merge, or discard this patch.
Components/GridContentLists/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\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridContentLists', function ($data) {
7
+add_filter('Flynt/addComponentData?name=GridContentLists', function($data) {
8 8
     Component::enqueueAssets('GridContentLists');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.
Components/HeroCta/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\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=HeroCta', function ($data) {
7
+add_filter('Flynt/addComponentData?name=HeroCta', function($data) {
8 8
     Component::enqueueAssets('HeroCta');
9 9
 
10 10
     return $data;
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
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 use Flynt\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=GridPosts', function ($data, $parentData) {
7
+add_filter('Flynt/addComponentData?name=GridPosts', function($data, $parentData) {
8 8
     Component::enqueueAssets('GridPosts');
9 9
 
10 10
     $data['pagination'] = (isset($parentData['pagination'])) ? $parentData['pagination'] : null;
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\Features\Components\Component;
6 6
 
7
-add_filter('Flynt/addComponentData?name=BlockWysiwyg', function ($data) {
7
+add_filter('Flynt/addComponentData?name=BlockWysiwyg', function($data) {
8 8
     Component::enqueueAssets('BlockWysiwyg');
9 9
 
10 10
     return $data;
Please login to merge, or discard this patch.