[wp-trac] [WordPress Trac] #26394: In update_option if option is missing add the option with autoload no

WordPress Trac noreply at wordpress.org
Tue Mar 3 23:54:07 UTC 2015


#26394: In update_option if option is missing add the option with autoload no
--------------------------------+------------------------------
 Reporter:  codix               |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Options, Meta APIs  |     Version:  3.7
 Severity:  normal              |  Resolution:
 Keywords:  needs-patch         |     Focuses:  performance
--------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  has-patch needs-docs needs-unit-tests => needs-patch


Comment:

 MikeHansenMe - Thanks for the tests, but they'll need to be a bit more
 specific. The tests should test that autoload is set correctly for the new
 options - you should be able to check this with `wp_load_alloptions()` and
 some sort of direct cache check, or perhaps by checking
 `$wpdb->num_queries` before and after a `get_option()` call. In
 particular, it'd be great to see a test that demonstrates how the default
 value of `$autoload` is 'yes'.

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


More information about the wp-trac mailing list