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

WordPress Trac noreply at wordpress.org
Mon Jan 19 23:03:44 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              |   Keywords:
  Focuses:  performance         |
--------------------------------+-----------------------------
 It would be great if you could change the code calling the "pre_option_"
 hook to accept FALSE as a valid option value returned from the hook. Could
 this be changed to use a return value of NULL as an indicator to continue
 further down the get_option function? I am implementing a file-based
 caching solution for a bunch of options that never change. I have over 50
 plug-ins on my site (yes, I need/use all of them) and even loading a
 simple post page cached using W3 Total Cache plugin makes 50 database
 calls (all options calls). I would like to avoid these because the whole
 point of the caching plugin is to minimise the use of server resources.
 Thanks in advance for consideration and perhaps some other ideas.

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


More information about the wp-trac mailing list