[wp-trac] [WordPress Trac] #12108: cant delete attachments when deleting a post
WordPress Trac
noreply at wordpress.org
Tue Jun 4 15:16:37 UTC 2013
#12108: cant delete attachments when deleting a post
-----------------------------+----------------------
Reporter: unsalkorkmaz | Owner:
Type: feature request | Status: closed
Priority: normal | Milestone:
Component: General | Version: 2.9.1
Severity: normal | Resolution: wontfix
Keywords: |
-----------------------------+----------------------
Comment (by creativeinfusion):
For anyone else who stumbles across this helpful little code snippet and
wonders why it isn't working for them, note that you need to use the
'before_delete_post' action since [18012] went live in WordPress version
3.2
This is because the post attachments have already been reassigned to the
post parent by the time the 'delete_post' hook is actioned.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/12108#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list