Opened 15 years ago
Closed 15 years ago
#10647 closed enhancement (fixed)
Add $force parameter to wp_delete_*() functions
Reported by: | scribu | Owned by: | scribu |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
With the new trash functionality, there is no way to delete a post or attachment directly. You have to call the function two times.
Both wp_delete_post() and wp_delete_attachment should have an optional $force parameter that bypasses the trash.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
I believe line 1148
should become
so that using wp_delete_post on an attachment maintains its behavior. Without this change a call of wp_delete_post (with force) on an attachment would move it to trash instead.