ソースを参照

: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
     $filtered[title] = $item->post_title;
16
     $filtered[title] = $item->post_title;
17
     $filtered[excerpt] = $item->post_excerpt;
17
     $filtered[excerpt] = $item->post_excerpt;
18
     $filtered[date] = $item->post_date;
18
     $filtered[date] = $item->post_date;
19
-
19
+    if(!$filtered[excerpt]) {
20
+        $filtered[excerpt] = get_the_excerpt($item);
21
+    }
20
     if($include_content) $filtered[content] = $item->post_content;
22
     if($include_content) $filtered[content] = $item->post_content;
21
 
23
 
22
     $filtered[featured] = get_the_post_thumbnail_url($item);
24
     $filtered[featured] = get_the_post_thumbnail_url($item);

+ 1
- 1
vue-theme/src/pages/single.vue ファイルの表示

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

読み込み中…
キャンセル
保存