WPMU Functions/get current site
Description
Returns an object containing various information relating to the site currently being viewed.
Parameters
None.
Return Values
- (object)
- An object containing details of the site currently being viewed. Details are represented in the following public variables:
- id
- (integer) ID of the site currently being viewed.
- domain
- (string) Domain of the site currently being viewed.
- path
- (string) Path of the site currently being viewed.
- site_name
- (string) Title of the site currently being viewed.
Usage
<?php get_current_site(); ?>
Examples
<?php
$current_site = get_current_site();
echo 'You are viewing '.$current_site->site_name;
?>
<?php
echo 'You are viewing '.get_current_site()->site_name;
?>