[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:14:37 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 rmccue):

 Replying to [comment:13 dd32]:
 > Where this comes up, is from #18322, As part of switching from the
 slashed to unslashed globals, certain functions which expect slashed data
 will need some special handling. One suggestion which I have seen floating
 around (which I personally prefer) would result in only passing select
 elements through functions like this. I'm thinking of the future use of
 the functions, not just what's easiest today.

 In which case, the fields that are passed in could be selected through a
 filter. In addition, in terms of backwards compatibility, this is a new
 addition, and hence carries no expectation of unslashed/slashed globals.

 It's also not about what's easiest (there's no real change in terms of
 that), but more about making `wp_insert_post` safe to call twice.

 Replying to [comment:12 scribu]:
 > In other words, the problem is that you can't distinguish between the
 original call made by Core and other calls.

 Also, calls to `wp_insert_post` can't allow custom meta data without
 setting `$_POST` manually.

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

More information about the wp-trac mailing list