Explorar el Código

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

tags/0.9.0
j hace 4 años
padre
commit
c3c7d9d026
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3
    0
      plugins/cia-endpoints/includes/class.make-endpoint.php

+ 3
- 0
plugins/cia-endpoints/includes/class.make-endpoint.php Ver fichero

@@ -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…
Cancelar
Guardar