function is_main_site( $blog_id = '' ) {}

Is main site?


  • int $blog_id: optional blog id to test (default current blog)

Return values

returns:True if not multisite or $blog_id is main site

Source code

function is_main_site( $blog_id = '' ) {

	global $current_site, $current_blog;

	if ( !is_multisite() )

		return true;

	if ( !$blog_id )

		$blog_id = $current_blog->blog_id;

	return $blog_id == $current_site->blog_id;



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: