[wp-trac] [WordPress Trac] #26832: Unable to force delete using get_delete_post_link()

WordPress Trac noreply at wordpress.org
Thu Jan 16 04:45:50 UTC 2014


#26832: Unable to force delete using get_delete_post_link()
--------------------------+------------------------------
 Reporter:  henry.wright  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.8
 Severity:  normal        |  Resolution:
 Keywords:  dev-feedback  |
--------------------------+------------------------------
Changes (by bcworkz):

 * keywords:   => dev-feedback


Comment:

 The problem appears to be in source:/trunk/src/wp-admin/post.php#L291
 `$force = ! EMPTY_TRASH_DAYS;`

 The constant defaults to 30, so for most people `$force` will be `false`.
 This appears to be logic to send deletions to trash unless trash is
 disabled by setting the constant to 0. As this is in the 'delete' case and
 not the 'trash' case, this logic seems out of place to me. If code reaches
 this point, the trash option should not even be a possibility, though
 there appears to be some reason for not deleting attachments which I'm
 unfamiliar with, and the reason I've not provided a patch.

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


More information about the wp-trac mailing list