Completed
Push — baseComponentsListPosts ( 2a73c9 )
by Markus
02:48
created
lib/Utils/TimberHelper.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@  discard block
 block discarded – undo
5 5
 use Timber\Post;
6 6
 
7 7
 class TimberHelper {
8
-  public static function getTimberPostById($postId, $moreLinkText = null, $stripteaser = false) {
8
+    public static function getTimberPostById($postId, $moreLinkText = null, $stripteaser = false) {
9 9
     global $post;
10 10
     $post = get_post($postId);
11 11
     setup_postdata($post, $moreLinkText, $stripteaser);
12 12
     $timberPost = new Post($post);
13 13
     wp_reset_postdata($post);
14 14
     return $timberPost;
15
-  }
15
+    }
16 16
 
17
-  public static function getExcerpt(
17
+    public static function getExcerpt(
18 18
     $postId,
19 19
     $len = 50,
20 20
     $force = false,
21 21
     $readmore = "Read More",
22 22
     $strip = true,
23 23
     $end = "…"
24
-  ) {
24
+    ) {
25 25
     global $post;
26 26
     $post = get_post($postId);
27 27
     setup_postdata($post, null, false);
@@ -29,5 +29,5 @@  discard block
 block discarded – undo
29 29
     $excerpt = $timberPost->get_preview($len, $force, $readmore, $strip, $end);
30 30
     wp_reset_postdata($post);
31 31
     return $excerpt;
32
-  }
32
+    }
33 33
 }
Please login to merge, or discard this patch.
Components/ListPosts/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_action('wp_enqueue_scripts', function () {
7
+add_action('wp_enqueue_scripts', function() {
8 8
     Component::enqueueAssets('ListPosts');
9 9
 });
10 10
 
11
-add_filter('Flynt/addComponentData?name=ListPosts', function ($data, $parentData) {
11
+add_filter('Flynt/addComponentData?name=ListPosts', function($data, $parentData) {
12 12
     $data['isArchive'] = is_home() || is_archive() ? true : false;
13 13
 
14 14
     $data['pagination'] = (isset($parentData['pagination'])) ? $parentData['pagination'] : null;
Please login to merge, or discard this patch.