[wp-trac] [WordPress Trac] #49597: Introduce preflight filter to wp_delete_attachment().

WordPress Trac noreply at wordpress.org
Tue Mar 10 22:46:25 UTC 2020


#49597: Introduce preflight filter to wp_delete_attachment().
---------------------------+----------------------------
 Reporter:  peterwilsoncc  |       Owner:  peterwilsoncc
     Type:  enhancement    |      Status:  closed
 Priority:  normal         |   Milestone:  5.5
Component:  Media          |     Version:
 Severity:  normal         |  Resolution:  fixed
 Keywords:  commit         |     Focuses:
---------------------------+----------------------------
Changes (by peterwilsoncc):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"47448" 47448]:
 {{{
 #!CommitTicketReference repository="" revision="47448"
 Media: Introduce preflight filter to `wp_delete_attachment()`.

 Introduces the filter `pre_delete_attachment` to allow developers to
 prevent or modify the deletion of attachments. This improves consistency
 with `wp_delete_post()` and `wp_trash_post()`.

 Props joemcgill, peterwilsoncc.
 Fixes #49597.
 }}}

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


More information about the wp-trac mailing list