[wp-trac] [WordPress Trac] #32991: wp_delete_post() does not return a WP_Post object

WordPress Trac noreply at wordpress.org
Fri Jul 31 12:28:57 UTC 2015


#32991: wp_delete_post() does not return a WP_Post object
----------------------------------------------+----------------------------
 Reporter:  johnbillion                       |       Owner:
     Type:  defect (bug)                      |      Status:  new
 Priority:  normal                            |   Milestone:  Future
Component:  Posts, Post Types                 |  Release
 Severity:  normal                            |     Version:
 Keywords:  needs-docs 2nd-opinion has-patch  |  Resolution:
                                              |     Focuses:
----------------------------------------------+----------------------------

Comment (by SergeyBiryukov):

 Replying to [comment:2 flixos90]:
 > Same goes for the documentation of `wp_delete_post_revision()` where it
 also says it can return `array|false|WP_Post|WP_Error|null`. As far as I
 can see it, the function can only return `array|false|stdClass` currently
 (not sure where the `WP_Error` and `null` come from).

 `wp_delete_post_revision()` can return `null` if `wp_get_post_revision()`
 returned `null`. Not sure where `WP_Error` comes from.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32991#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list