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

WordPress Trac wp-trac at lists.automattic.com
Sun Oct 2 02:09:27 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          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------------

Comment (by scribu):

 Replying to [comment:12 rmccue]:
 > If a plugin tries to add a post manually (by passing in a data array),
 all data will be taken from this for `wp_insert_post`. However, these
 metabox callbacks will instead get the data from `$_POST`, and hence, the
 wrong data will be added.

 In other words, the problem is that you can't distinguish between the
 original call made by Core and other calls.

 It's similar to the problem of differentiating the main WP_Query instance
 from others.

 I think what we actually need here is a new action that's fired only after
 the "Publish/save" button is pushed.

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


More information about the wp-trac mailing list