소스 검색

:recycle: setting hero link on sorted types

tags/0.9.0
J 4 년 전
부모
커밋
97f8aa4bf1
3개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 5
    1
      plugins/cia-endpoints/includes/class.make-sortby.php
  2. 1
    1
      plugins/cia-endpoints/includes/formats.php
  3. 1
    1
      vue-theme/src/pages/single.vue

+ 5
- 1
plugins/cia-endpoints/includes/class.make-sortby.php 파일 보기

150
 
150
 
151
     public function prepare_items_for_reponse( $items ) {
151
     public function prepare_items_for_reponse( $items ) {
152
         $collection = array();
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
         return $collection;
158
         return $collection;
155
     }
159
     }
156
 }
160
 }

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

+ 1
- 1
vue-theme/src/pages/single.vue 파일 보기

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

Loading…
취소
저장