[wp-trac] [WordPress Trac] #23399: Add filter wp_insert_attachment_data mirroring wp_insert_post_data

WordPress Trac noreply at wordpress.org
Thu Nov 14 18:26:43 UTC 2013


#23399: Add filter wp_insert_attachment_data mirroring wp_insert_post_data
-------------------------+------------------------------
 Reporter:  israelshirk  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Post Types   |     Version:  3.5
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by bendoh):

 Bumping this.

 I ran into a situation where this filter would have saved me an extra
 query: I would have been able to transform the data before it ever went
 into the database. But since there's no filter on this, there's no way to
 modify the attachment data going in via media_handle_slideload() before it
 hits the database, which means there's no opportunity for validation or
 data transformation.

 Instead, the insert had to be performed before the validation /
 transformation step could be applied, which wasted a query.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/23399#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list