[wp-trac] [WordPress Trac] #18833: Pass raw data into save_post/wp_insert_post

WordPress Trac wp-trac at lists.automattic.com
Sat Oct 1 09:15:14 UTC 2011


#18833: Pass raw data into save_post/wp_insert_post
----------------------------+-----------------------------
 Reporter:  rmccue          |      Owner:  rmccue
     Type:  enhancement     |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:  has-patch
----------------------------+-----------------------------
 Almost all tutorials about custom metaboxes (in addition to post meta) use
 `$_POST` to get the data that was submitted. Unfortunately, this breaks if
 a plugin uses anything that calls `wp_insert_post()` in the same request.

 The patch attached here includes the `$postarr` array, which is the raw
 data passed in, and which is `$_POST` from `wp-admin/post.php`. This
 allows one to use the third parameter to the callback to set meta data
 instead of having to use `$_POST` directly.

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


More information about the wp-trac mailing list