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

WordPress Trac noreply at wordpress.org
Mon Mar 9 14:49:13 UTC 2020


#49597: Introduce preflight filter to wp_delete_attachment().
---------------------------+------------------------------
 Reporter:  peterwilsoncc  |       Owner:  (none)
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:
 Severity:  normal         |  Resolution:
 Keywords:  needs-patch    |     Focuses:
---------------------------+------------------------------

Comment (by joemcgill):

 @peterwilsoncc is the goal here just to avoid having to check the post
 type of the post getting passed to the already included filter, or is
 there some other benefit? Alternatively, should we consider a more robust
 `pre_delete_post_{$post_type}` filter rather than special casing
 attachments?

 If you could shed more light on the use case you see here, that would be
 helpful.

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


More information about the wp-trac mailing list