Completed
Push — componentlibrary_featureless ( 5630de...2d553e )
by Dominik
02:12 queued 37s
created
Components/ListSocial/functions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
 use Flynt\Api;
6 6
 use Flynt\Utils\Asset;
7 7
 
8
-add_filter('Flynt/addComponentData?name=ListSocial', function ($data) {
8
+add_filter('Flynt/addComponentData?name=ListSocial', function($data) {
9 9
     if (!empty($data['social'])) {
10
-        $data['social'] = array_map(function ($item) {
10
+        $data['social'] = array_map(function($item) {
11 11
             $item['icon'] = Asset::getContents("Components/ListSocial/Assets/{$item['platform']}.svg");
12 12
             return $item;
13 13
         }, $data['social']);
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,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.
Components/FeaturePasswordForm/functions.php 3 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Flynt\Components\FeaturePasswordForm;
4 4
 
5 5
 use Timber\Timber;
6
-use Timber\Post;
7 6
 
8 7
 add_filter('the_password_form', function ($output) {
9 8
     $context = Timber::get_context();
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 add_filter('the_password_form', function ($output) {
9 9
     $context = Timber::get_context();
10 10
     $context['form'] = [
11
-      'url' => site_url('/wp-login.php?action=postpass', 'login_post')
11
+        'url' => site_url('/wp-login.php?action=postpass', 'login_post')
12 12
     ];
13 13
 
14 14
     return Timber::fetch('index.twig', $context);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 use Timber\Timber;
6 6
 use Timber\Post;
7 7
 
8
-add_filter('the_password_form', function ($output) {
8
+add_filter('the_password_form', function($output) {
9 9
     $context = Timber::get_context();
10 10
     $context['form'] = [
11 11
       'url' => site_url('/wp-login.php?action=postpass', 'login_post')
Please login to merge, or discard this patch.
inc/youtubeNoCookieEmbed.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,8 +4,6 @@
 block discarded – undo
4 4
  */
5 5
 namespace Flynt\YoutubeNoCookieEmbed;
6 6
 
7
-use Flynt\Utils\Oembed;
8
-
9 7
 add_action('oembed_result', 'Flynt\YoutubeNoCookieEmbed\setNoCookieDomain', 10, 2);
10 8
 add_filter('embed_oembed_html', 'Flynt\YoutubeNoCookieEmbed\setNoCookieDomain', 10, 2);
11 9
 
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.