-
Notifications
You must be signed in to change notification settings - Fork 651
Return full post object when deleting post #1256
Conversation
|
@WP-API/amigos #reviewmerge |
|
From the HTTP spec for DELETE:
I don’t know what |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$mock_request isn't really the right name, since this is a real request and "mock" has a specific meaning. $get_request?
|
This generally looks OK to me. One thing we might want to consider is wrapping the post in another object (e.g. |
|
Also, should we consider this from #627? if ( $new_status === 'trash' ) {
// Send a 202 if it's only trashed to indicate that it will be
// actually deleted later
$response->set_status( 202 );i.e. 200 = permanently deleted, 202 = trashed Not sure we need the distinction now with the split from double-DELETE to separate trash/perma-delete, but worth thinking about. |
See #1260 |
Return full post object when deleting post
See #1224