get_current_site() WordPress Function
The get_current_site() function is used to get the current network object. This function is useful when you need to get information about the current network, such as its name or ID.
get_current_site() #
Gets the current network.
Description
Returns an object containing the ‘id’, ‘domain’, ‘path’, and ‘site_name’ properties of the network being viewed.
See also
Return
Source
File: wp-includes/ms-functions.php
function get_current_site() {
global $current_site;
return $current_site;
}
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | Introduced. |