[wp-trac] [WordPress Trac] #18422: Oddities in add(_site)_option
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 16 00:59:42 UTC 2011
#18422: Oddities in add(_site)_option
--------------------------+-----------------------------
Reporter: duck_ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
[13139] made a number of changes to standardise the the values returned by
the options API. However add_option() will still return null when the
option already exists. This should be changed to `return false` and the
@return docs updated.
I then also spotted a difference in the behaviour of add_option() vs.
add_site_option(). add_option() will just stop if the option already
exists, see above, but add_site_option() will call update_site_option().
On singlesite installs add_site_option() is just a wrapper for
add_option() so calling add_site_option() has different behaviour on
multisite vs. singlesite.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18422>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list