[wp-trac] [WordPress Trac] #37414: Use `get_network()` instead of global `$current_site`
WordPress Trac
noreply at wordpress.org
Wed Oct 19 04:46:16 UTC 2016
#37414: Use `get_network()` instead of global `$current_site`
--------------------------------+-------------------------
Reporter: flixos90 | Owner: jeremyfelt
Type: enhancement | Status: closed
Priority: normal | Milestone: 4.7
Component: Networks and Sites | Version: 4.6
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: multisite
--------------------------------+-------------------------
Changes (by jeremyfelt):
* status: reviewing => closed
* resolution: => fixed
Comment:
In [changeset:"38814"]:
{{{
#!CommitTicketReference repository="" revision="38814"
Multisite: Use `get_network()` and `get_current_network_id()` for current
network data.
`get_network()` falls back to the current network when called without any
arguments. Between this and `get_current_network_id()`, we can replace
almost all instances of the global `$current_site` and all instances of
`get_current_site()`.
This effectively deprecates `get_current_site()`, something that we'll do
in a future ticket.
Props flixos90.
Fixes #37414.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37414#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list