[wp-trac] [WordPress Trac] #37414: Use `get_network()` instead of global `$current_site`
WordPress Trac
noreply at wordpress.org
Wed Oct 19 04:37:38 UTC 2016
#37414: Use `get_network()` instead of global `$current_site`
--------------------------------+-------------------------
Reporter: flixos90 | Owner: jeremyfelt
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.7
Component: Networks and Sites | Version: 4.6
Severity: normal | Resolution:
Keywords: has-patch | Focuses: multisite
--------------------------------+-------------------------
Comment (by jeremyfelt):
[attachment:37414.3.diff] is another refresh.
Things are looking good.
* I did some brief performance testing between the global
`$current_site()` and `get_network()` and things are only slightly slower.
In most cases, this will be pulling from something that's already
available. The only real overhead is the application of the `get_network`
filter on every usage, which is a nice side effect on its own.
* All unit tests in single and multisite are passing. We aren't using
`get_network()` or `get_current_network_id()` in any place that is not
multisite.
* Single site install, multisite setup, multisite management, new site
signup, are all working as expected. This covers some of the things that
are kind of hard to cover in our tests.
Let's do it. :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37414#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list