[wp-trac] [WordPress Trac] #26394: In update_option if option is missing add the option with autoload no
WordPress Trac
noreply at wordpress.org
Thu Mar 5 19:13:03 UTC 2015
#26394: In update_option if option is missing add the option with autoload no
--------------------------------+---------------------------
Reporter: codix | Owner: boonebgorges
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.2
Component: Options, Meta APIs | Version: 3.7
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: performance
--------------------------------+---------------------------
Changes (by boonebgorges):
* owner: => boonebgorges
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"31628"]:
{{{
#!CommitTicketReference repository="" revision="31628"
Introduce `$autoload` parameter to `update_option()`.
When creating an option via `add_option()`, the `$autoload` param allows
you to
tell WP whether the option should be loaded as part of the 'alloptions'
cache
during every pageload. `update_option()`, when used with a non-existent
option
calls `add_option()` internally. The new `$autoload` param in
`update_option()`
is passed along to `add_option()` in cases where the option does not yet
exist.
The associated unit tests are skipped on multisite due to an issue that
causes
`WP_INSTALLING` to force cache misses. See #31130.
Props codix, nofearinc, MikeHansenMe.
Fixes #26394.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26394#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list