[wp-trac] [WordPress Trac] #43704: pre_option_{$option} filter is case sensitive although options are not.

WordPress Trac noreply at wordpress.org
Sun Apr 8 01:53:14 UTC 2018


#43704: pre_option_{$option} filter is case sensitive although options are not.
--------------------------------+------------------------------
 Reporter:  programmin          |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:  4.9.5
 Severity:  normal              |  Resolution:
 Keywords:                      |     Focuses:
--------------------------------+------------------------------

Comment (by programmin):

 How would this break "a lot of things"? Are people using the filter to
 purposely get_option('mYopTION') so they can filter 'pre_option_mYopTION'
 and only filter certain cases you're getting an option?

 In general I'd think this would help developers like myself that had
 debugged an hour or more and then realized various parts of code just
 aren't get_option() with the exact same case. Backward-compatibility comes
 first though I suppose. Can there be a pre_option_nocase_{option} filter
 perhaps?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43704#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list