瀏覽代碼

:recycle: setting hero link on sorted types

tags/0.9.0
J 4 年之前
父節點
當前提交
97f8aa4bf1

+ 5
- 1
plugins/cia-endpoints/includes/class.make-sortby.php 查看文件

@@ -150,7 +150,11 @@ class Make_Sort_By extends WP_REST_Controller {
150 150
 
151 151
     public function prepare_items_for_reponse( $items ) {
152 152
         $collection = array();
153
-        forEach( $items as $key => $item ) $collection[$key] = default_post_format($item, false);
153
+        $formatted = default_post_format($item, false);
154
+        $formatted[hero] = get_post_meta( $post->ID, 'hero_header', true );
155
+        
156
+        forEach( $items as $key => $item ) $collection[$key] = $formatted;
157
+
154 158
         return $collection;
155 159
     }
156 160
 }

+ 1
- 1
plugins/cia-endpoints/includes/formats.php 查看文件

@@ -16,7 +16,7 @@ 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
-    $filtered[now] = strval(time());
19
+    
20 20
     if(!$filtered[excerpt]) {
21 21
         $filtered[excerpt] = get_the_excerpt($item);
22 22
     }

+ 1
- 1
vue-theme/src/pages/single.vue 查看文件

@@ -31,7 +31,7 @@
31 31
             
32 32
         credits(v-if="type === 'episode' && post" :post="post")
33 33
 
34
-        //- end of article icon     
34
+        //- end of article icon
35 35
         footer.f-col
36 36
             img(src="../star.svg")
37 37
 

Loading…
取消
儲存