[wp-trac] [WordPress Trac] #31985: WP_Network class
WordPress Trac
noreply at wordpress.org
Sat Sep 12 21:15:46 UTC 2015
#31985: WP_Network class
------------------------------------+-------------------------
Reporter: johnjamesjacoby | Owner: jeremyfelt
Type: task (blessed) | Status: accepted
Priority: normal | Milestone: 4.4
Component: Networks and Sites | Version: 3.0
Severity: normal | Resolution:
Keywords: dev-feedback has-patch | Focuses: multisite
------------------------------------+-------------------------
Comment (by jeremyfelt):
Another day, another trim. :)
[https://core.trac.wordpress.org/attachment/ticket/31985/31985.8.diff
31985.8.diff] is what I'm looking at for the initial implementation right
now. We can leave the ticket open as a task for a bit to make sure we're
catching everything.
Differing from previous patches:
* I removed the `load_core_options` change and left the original as is.
This would normally only fire during multisite's bootstrap and only do
anything if a persistent object cache was not available. If we move it to
`WP_Network()` without the object cache check, we end up setting cache
values every time a `WP_Network` object is created. There's probably a way
to prime persistent cache properly, but I'm not sure we need the existing
load functionality every time a new object is created.
* Similar to that, I took out the `set_site_name` method temporarily as it
currently relies on `get_site_option()`, which only works with the current
network. This makes it the perfect time to introduce a
`get_network_option()` that also takes a `$network_id`. We're ready to go
on that in #33814. Once that is available, some of this starts making more
sense.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31985#comment:39>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list