[wp-trac] [WordPress Trac] #31985: WP_Network class
WordPress Trac
noreply at wordpress.org
Sun Sep 13 23:31:00 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):
In [changeset:"34097"]:
{{{
#!CommitTicketReference repository="" revision="34097"
Multisite: Introduce the `WP_Network` class.
A `WP_Network` object initially matches a row from `wp_site` and is
populated with additional properties used by WordPress core. The first
iteration is used to retrieve an existing network based on data passed to
the class.
* A network can be retrieved by its ID through
`WP_Network::get_instance()`, following in the steps of `WP_Post` and
`WP_Comment`.
* A network object can be created or completed by passing initial
properties in as a standard object to `new WP_Network()`.
Using these methods, we are now able to populate the global
`$current_site` during load via this class.
Props johnjamesjacoby, jeremyfelt, drewapicture, wonderboymusic.
See #31985.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31985#comment:40>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list