bp_core_is_main_site

The BuddyPress bp core is main site function.

Description

bp_core_is_main_site( (string) $blog_id = '' ); 

Checks if current blog is root blog of site. Deprecated in 1.5.

Parameters (1)

0. $blog_id — Optional. (string) => ''
Blog id to test (default current blog)

Usage

  1. if ( !function_exists( 'bp_core_is_main_site' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/1.5.php'; 
  3.  
  4. // optional blog id to test (default current blog) 
  5. $blog_id = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_core_is_main_site($blog_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/bp-core/deprecated/1.5.php  
  1. function bp_core_is_main_site( $blog_id = '' ) { 
  2. _deprecated_function( __FUNCTION__, '1.5', 'is_main_site()' ); 
  3. return is_main_site( $blog_id );