Просмотр исходного кода

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

tags/0.9.0
j 4 лет назад
Родитель
Сommit
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();

Загрузка…
Отмена
Сохранить