[wp-trac] [WordPress Trac] #22358: Trim option names before pre filtering them

WordPress Trac noreply at wordpress.org
Sun Nov 4 07:10:45 UTC 2012


#22358: Trim option names before pre filtering them
-----------------------------+-------------------------
 Reporter:  evansolomon      |       Type:  enhancement
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  General
  Version:                   |   Severity:  normal
 Keywords:  has-patch        |
-----------------------------+-------------------------
 In `get_option()` we `trim()` the option name before looking up its value,
 but after the `pre_option_$option` filter runs.  I think it makes more
 sense for the `trim()` to be done before anything else, and I can't think
 of a use case for 'foo ' and 'foo' getting different `pre_option_$option`
 treatments.

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


More information about the wp-trac mailing list