WordPress.org

Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #21767, comment 92


Ignore:
Timestamp:
02/26/13 23:01:10 (14 months ago)
Author:
ryan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #21767, comment 92

    v1 v2  
    1 We are changing tack on this. Functions such as wp_insert_post() that accept argument arrays will accept a "slashed" argument. slashed will default to true. Plugins and core functions that wish to pass unslashed data will need to pass slashed => false. When slashed is true, wp_unslash() will be run on the passed I data. When it is false wp_unslash will not be run. As I am still on the road, could someone patch wp_insert_post() to handle the slashed argument and have all core calls to wp_insert_post() pass slashed => false since we'd like to maintain passing unslashed data in core as a new standard? Once that is in, we can roll out to other functions that used to be slashed and get things back compat again. The new wp_update_post_meta() and wp_insert_post_meta() functions can be removed. 
     1We are changing tack on this. Functions such as wp_insert_post() that accept argument arrays will accept a "slashed" argument. slashed will default to true. Plugins and core functions that wish to pass unslashed data will need to pass slashed => false. When slashed is true, wp_unslash() will be run on the passed in data. When it is false wp_unslash will not be run. As I am still on the road, could someone patch wp_insert_post() to handle the slashed argument and have all core calls to wp_insert_post() pass slashed => false since we'd like to maintain passing unslashed data in core as a new standard? Once that is in, we can roll out to other functions that used to be slashed and get things back compat again. The new wp_update_post_meta() and wp_insert_post_meta() functions can be removed. 
    22 
    3 It is clear that we'll have to fork a bunch of functions to reach a slash less future. We'll probably take this opportunity to add methods to WP_Post and introduce WP_Comment. That's a discussion for 3.7, however. 
     3It is clear that we'll have to fork a bunch of functions to reach a slashless future. We'll probably take this opportunity to add methods to WP_Post and introduce WP_Comment. That's a discussion for 3.7, however. 
    44 
    55Possibly back on the table for 3.6 is moving away for the GPCS supergloblals.  It's looking like we my never be able to stop slashing GPCS, so let's consider something like WP:GET, WP:POST. Something light with just what we need. This can be discussed on #22325.