rebase on oct-10-2023
This commit is contained in:
@@ -1063,8 +1063,10 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
);
|
||||
}
|
||||
|
||||
// (Note that internally this falls through to `wp_delete_post()`
|
||||
// if the Trash is disabled.)
|
||||
/*
|
||||
* (Note that internally this falls through to `wp_delete_post()`
|
||||
* if the Trash is disabled.)
|
||||
*/
|
||||
$result = wp_trash_post( $id );
|
||||
$post = get_post( $id );
|
||||
$response = $this->prepare_item_for_response( $post, $request );
|
||||
@@ -1269,8 +1271,10 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// Sending a null date or date_gmt value resets date and date_gmt to their
|
||||
// default values (`0000-00-00 00:00:00`).
|
||||
/*
|
||||
* Sending a null date or date_gmt value resets date and date_gmt to their
|
||||
* default values (`0000-00-00 00:00:00`).
|
||||
*/
|
||||
if (
|
||||
( ! empty( $schema['properties']['date_gmt'] ) && $request->has_param( 'date_gmt' ) && null === $request['date_gmt'] ) ||
|
||||
( ! empty( $schema['properties']['date'] ) && $request->has_param( 'date' ) && null === $request['date'] )
|
||||
|
||||
Reference in New Issue
Block a user