Completed
Push — constructionplanless ( cb84a3...5132cc )
by Dominik
01:29
created
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.