Преглед изворни кода

:sparkles: added excerpt generation

tags/0.9.0
j пре 4 година
родитељ
комит
8e4e21e59b
2 измењених фајлова са 4 додато и 2 уклоњено
  1. 3
    1
      plugins/cia-endpoints/includes/formats.php
  2. 1
    1
      vue-theme/src/pages/single.vue

+ 3
- 1
plugins/cia-endpoints/includes/formats.php Прегледај датотеку

@@ -16,7 +16,9 @@ function default_post_format( $item, $include_content ) {
16 16
     $filtered[title] = $item->post_title;
17 17
     $filtered[excerpt] = $item->post_excerpt;
18 18
     $filtered[date] = $item->post_date;
19
-
19
+    if(!$filtered[excerpt]) {
20
+        $filtered[excerpt] = get_the_excerpt($item);
21
+    }
20 22
     if($include_content) $filtered[content] = $item->post_content;
21 23
 
22 24
     $filtered[featured] = get_the_post_thumbnail_url($item);

+ 1
- 1
vue-theme/src/pages/single.vue Прегледај датотеку

@@ -28,7 +28,7 @@
28 28
                     img(src="https://i1.wp.com/www.craftinamerica.org/wp-content/uploads/2020/09/20200210_133120-e1599254267307.jpg")
29 29
                     .f-col
30 30
                         h2.t-up {{ artist.title }}
31
-                        p {{ artist }}
31
+                        p {{ artist.content }}
32 32
             
33 33
         credits(v-if="type === 'episodes' && post" :post="post")
34 34
 

Loading…
Откажи
Сачувај