[wp-trac] [WordPress Trac] #11470: Don't have wp_delete_post and wp_delete_attachment trash the item by default
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 17 08:07:07 UTC 2009
#11470: Don't have wp_delete_post and wp_delete_attachment trash the item by
default
--------------------------+-------------------------------------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: Trash | Version: 2.9
Severity: normal | Keywords: dev-feedback
--------------------------+-------------------------------------------------
Comment(by azaozz):
Yes, basically we have two options:
1. Merge wp_trash_post() into wp_delete_post() and do both trashing and
deleting from there.
* Pros: will catch all posts that are deleted and trash them instead.
* Cons: will need for plugins to adapt by adding second param if they
want to instantly delete a post.
2. Separate the two functions and stop calling `delete()` from `trash()`
and back `trash()` from `delete()`.
* Pros: no API change for plugins.
* Cons: posts that could have been trashed are deleted instead.
Same applies for attachments and comments.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11470#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list