[wp-trac] [WordPress Trac] #13401: Add custom field to new post doesn't create draft

WordPress Trac wp-trac at lists.automattic.com
Tue May 25 14:38:03 UTC 2010


#13401: Add custom field to new post doesn't create draft
--------------------------+-------------------------------------------------
 Reporter:  duck_         |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  high          |   Milestone:  3.0      
Component:  General       |     Version:  3.0      
 Severity:  blocker       |    Keywords:  has-patch
--------------------------+-------------------------------------------------

Comment(by duck_):

 Replying to [comment:9 ryan]:
 > {{{
 > $post_data = array();
 > $post_data['post_ID'] = $pid;
 > ...
 > $pid = edit_post($post_data);
 > }}}
 >
 > That way _POST can be left untouched.

 Unfortunately the problem with that is the issue of duplicate fields
 arises again. add_meta(), which is called as part of edit_post(), doesn't
 look at the array passed to edit_post() it only uses the $_POST super
 global.

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


More information about the wp-trac mailing list