WPDev.one
Core Class

WP_Network

class WP_Network // Constructor: function Object() { [native code] }

Core class used for interacting with a multisite network.

Methods 9 methods

Method / Return Description
get_instance()
(WP_Network

Retrieves a network from the database by its ID.

Parameters: $network_id: mixed
__construct()
void

Creates a new WP_Network object.

Parameters: $network: mixed
__get()
mixed

Getter.

Parameters: $key: mixed
__isset()
bool

Isset-er.

Parameters: $key: mixed
__set()
void

Setter.

Parameters: $key: mixed, $value: mixed
get_main_site_id()
int

Returns the main site ID for the network.

_set_site_name()
void

Sets the site name assigned to the network if one has not been populated.

_set_cookie_domain()
void

Sets the cookie domain based on the network domain if one has

get_by_path()
(WP_Network

Retrieves the closest matching network for a domain and path.

Parameters: $domain: mixed, $path: mixed, $segments: mixed

Properties

Property / Type Description
$id
mixed
public
No description available.
$domain
mixed
public
No description available.
$path
mixed
public
No description available.
$blog_id
mixed
public
No description available.
$cookie_domain
mixed
public
No description available.
$site_name
mixed
public
No description available.

Class Information

Since Version
4.4.0
Source File
wp-includes/class-wp-network.php
Advertisement