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

WordPress Trac noreply at wordpress.org
Tue Feb 5 21:36:26 UTC 2013


#23399: Add filter wp_insert_attachment_data mirroring wp_insert_post_data
-----------------------------+-------------------------
 Reporter:  israelshirk      |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Post Types
  Version:  trunk            |   Severity:  minor
 Keywords:                   |
-----------------------------+-------------------------
 In commercial applications it's handy to use the wp_insert_post_data
 filter in wp_insert_post() to control attributes of a post being inserted
 based on the user's role and other variables.  We're using this to force
 content to go through a complex approval process which runs off of the
 post status.

 wp_insert_attachment() does not have a similar filter, which makes content
 approval processes difficult to implement.

 This patch adds a filter named wp_insert_attachment_data filter to
 wp_insert_attachment() which mirrors the form and functionality in
 wp_insert_post().

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


More information about the wp-trac mailing list