Definition:
function is_main_site( $blog_id = '' ) {}
Is main site?
Parameters
- 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; }
2135
No comments yet... Be the first to leave a reply!