[wp-trac] [WordPress Trac] #28290: Changing _site_option functions for _network_option functions
WordPress Trac
noreply at wordpress.org
Thu Oct 1 23:01:55 UTC 2015
#28290: Changing _site_option functions for _network_option functions
------------------------------------+-------------------------
Reporter: jmlapam | Owner: jeremyfelt
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.4
Component: Options, Meta APIs | Version: 4.0
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses: multisite
------------------------------------+-------------------------
Comment (by jeremyfelt):
Replying to [comment:18 spacedmonkey]:
> - All these functions allow for 0 to be sent as param, as this is a
valid arg. 0 values are used to stored truly global network options.
> We need something that will detect if the network is false, but allow 0
to be passed.
I missed this on one of my read throughs. Let's hold of on worrying about
this immediately and focus on supporting valid networks. I like the
thought though and we may be able to attach it to this ticket once other
things are in.
[https://core.trac.wordpress.org/attachment/ticket/28290/28290.diff
28290.diff] is a new riff on
[https://core.trac.wordpress.org/attachment/ticket/28290/28290.2a.patch
28290.2a.patch]. I'm going to hold on part b until this first one is in.
Everything is looking great, I modified the following:
* Some documentation, spacing tweaks.
* Now that we're using `$network_id` as part of the cache key, we don't
need to rely on `{` and `}` wrapping it.
* An `! isset( $value )` check was removed in the patch, which could
change expected behavior. I've added that back.
* `$network_id` was set to `true` by default in `get_network_option()`.
I'm going to sit on things for a minute or few, but we're looking good.
Thanks for all the great work @spacedmonkey.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28290#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list