Completed
Push — componentlibrary_featureless ( 5630de...2d553e )
by Dominik
02:12 queued 37s
created
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.
inc/componentLogServer.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.
inc/jquery.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\Utils\Asset;
6 6
 
7
-add_action('wp_enqueue_scripts', function () {
7
+add_action('wp_enqueue_scripts', function() {
8 8
     $jqueryVersion = wp_scripts()->registered['jquery']->ver;
9 9
     wp_deregister_script('jquery');
10 10
 
Please login to merge, or discard this patch.
inc/cleanRss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
  *
13 13
  * Don't return the default description in the RSS feed if it hasn't been changed
14 14
  */
15
-add_filter('get_bloginfo_rss', function ($bloginfo) {
15
+add_filter('get_bloginfo_rss', function($bloginfo) {
16 16
     $defaultTagline = 'Just another WordPress site';
17 17
     return ($bloginfo === $defaultTagline) ? '' : $bloginfo;
18 18
 });
Please login to merge, or discard this patch.
inc/baseStyle.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 function disallowRobots()
17 17
 {
18 18
     if (defined('WPSEO_VERSION')) {
19
-        add_filter('wpseo_robots', function () {
19
+        add_filter('wpseo_robots', function() {
20 20
             return "noindex,nofollow";
21 21
         });
22 22
     } else {
23 23
         remove_action('wp_head', 'noindex', 1);
24
-        add_action('wp_head', function () {
24
+        add_action('wp_head', function() {
25 25
             echo "<meta name='robots' content='noindex,nofollow' />\n";
26 26
         });
27 27
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     $rules = get_option('rewrite_rules');
38 38
 
39
-    if (! isset($rules["{$routeName}/(.*?)/?$"])) {
39
+    if (!isset($rules["{$routeName}/(.*?)/?$"])) {
40 40
         flush_rewrite_rules();
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
inc/timberLoader.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.
inc/acf.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 
4 4
 use Flynt\Utils\Options;
5 5
 
6
-add_filter('pre_http_request', function ($preempt, $args, $url) {
6
+add_filter('pre_http_request', function($preempt, $args, $url) {
7 7
     if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) {
8 8
         $response = wp_cache_get($url, 'oembedCache');
9 9
         if (!empty($response)) {
@@ -13,14 +13,14 @@  discard block
 block discarded – undo
13 13
     return false;
14 14
 }, 10, 3);
15 15
 
16
-add_filter('http_response', function ($response, $args, $url) {
16
+add_filter('http_response', function($response, $args, $url) {
17 17
     if (strpos($url, 'https://www.youtube.com/oembed') !== false || strpos($url, 'https://vimeo.com/api/oembed') !== false) {
18 18
         wp_cache_set($url, $response, 'oembedCache');
19 19
     }
20 20
     return $response;
21 21
 }, 10, 3);
22 22
 
23
-add_filter('acf/fields/google_map/api', function ($api) {
23
+add_filter('acf/fields/google_map/api', function($api) {
24 24
     $apiKey = Options::get('globalOptions', 'feature', 'Acf', 'googleMapsApiKey');
25 25
     if ($apiKey) {
26 26
         $api['key'] = $apiKey;
Please login to merge, or discard this patch.
inc/mimeTypes.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
 namespace Flynt\MimeTypes;
6 6
 
7
-add_filter('upload_mimes', function ($mimes) {
7
+add_filter('upload_mimes', function($mimes) {
8 8
     $mimes['svg'] = 'image/svg+xml';
9 9
     return $mimes;
10 10
 });
Please login to merge, or discard this patch.
inc/removeEditor.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
 namespace Flynt\RemoveEditor;
6 6
 
7
-add_action('init', function () {
7
+add_action('init', function() {
8 8
     remove_post_type_support('page', 'editor');
9 9
     remove_post_type_support('post', 'editor');
10 10
 });
Please login to merge, or discard this patch.