Ticket #38808: 38808-delete-post.patch
File 38808-delete-post.patch, 787 bytes (added by , 8 years ago) |
---|
-
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
708 708 $post = get_post( $request['id'] ); 709 709 710 710 if ( $post && ! $this->check_delete_permission( $post ) ) { 711 return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete posts.' ), array( 'status' => rest_authorization_required_code() ) );711 return new WP_Error( 'rest_cannot_delete', __( 'Sorry, you are not allowed to delete this post.' ), array( 'status' => rest_authorization_required_code() ) ); 712 712 } 713 713 714 714 return true;