Skip to content

Commit

Permalink
Include future dones in API response
Browse files Browse the repository at this point in the history
#fix
  • Loading branch information
aduth committed May 28, 2017
1 parent 5d21cde commit 2310718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/endpoints/class-wp-rest-dones-dones-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function prepare_item_for_response( $post, $request ) {
'user' => (int) $post->post_author,
'text' => $post->post_title,
'date' => $post->post_date,
'done' => ( 'publish' === $post->post_status )
'done' => ( 'draft' !== $post->post_status )
);
}

Expand All @@ -232,7 +232,7 @@ public function prepare_item_for_response( $post, $request ) {
public function get_done_base_args( $request ) {
$args = array(
'post_type' => 'done',
'post_status' => array( 'publish', 'draft' ),
'post_status' => array( 'publish', 'draft', 'future' ),
'orderby' => 'date',
'order' => 'desc',
'paged' => (int) $request['page']
Expand Down

0 comments on commit 2310718

Please sign in to comment.