소스 검색

:bug: fixed missing credits in wp-api | closes #83

tags/0.9.0
j 4 년 전
부모
커밋
c3c7d9d026
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3
    0
      plugins/cia-endpoints/includes/class.make-endpoint.php

+ 3
- 0
plugins/cia-endpoints/includes/class.make-endpoint.php 파일 보기

@@ -80,6 +80,9 @@ class Make_Endpoint_For extends WP_REST_Controller {
80 80
 
81 81
             $filtered[relatedto] = p2p_related_to( $item->ID, $item->post_type );
82 82
             $filtered[content] = $item->post_content;
83
+            
84
+            if($item->post_type === 'episode') $filtered[credits] = get_post_meta( $item->ID, 'credits', true );
85
+
83 86
             $collection[$item->ID] = $filtered;
84 87
         }
85 88
         wp_reset_postdata();

Loading…
취소
저장