[wp-trac] [WordPress Trac] #31061: Accept FALSE as valid value from "pre_option_" hook

WordPress Trac noreply at wordpress.org
Tue Jan 27 15:59:58 UTC 2015


#31061: Accept FALSE as valid value from "pre_option_" hook
--------------------------------+------------------------------
 Reporter:  martin.krcho        |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:  4.1
 Severity:  normal              |  Resolution:
 Keywords:  close               |     Focuses:  performance
--------------------------------+------------------------------

Comment (by martin.krcho):

 I can easily store false as an empty string or string 'false', but my
 problem is that all the consumers are third party plugins. I have no idea
 how returning something other than false will affect their behaviour. I
 thought about adding the option value of FALSE into WordPress cache in the
 'pre_option_' hook, but the cache value is also checked against FALSE
 further down the 'get_option'. I am not sure what to do here. I'll
 probably have to start changing code of third party plugins to make their
 options to autoload and contact the authors to sneak the change into their
 next release. That should be fun :(

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


More information about the wp-trac mailing list