get_current_site()
Gets the current network.
Returns an object containing the 'id', 'domain', 'path', and 'site_name' properties of the network being viewed.
No Hooks.
Returns
WP_Network. The current network.
Usage
get_current_site();
Notes
- See: wpmu_current_site()
- Global. WP_Network.
$current_siteThe current network.
Changelog
| Since 3.0.0 | Introduced. |
get_current_site() get current site code WP 7.0
function get_current_site() {
global $current_site;
return $current_site;
}