bp_core_get_root_domain

Return the domain for the root blog.

Description

(string) bp_core_get_root_domain(); 

Eg: http://example.com OR https://example.com

Returns (string)

The domain URL for the blog.


Usage

  1. if ( !function_exists( 'bp_core_get_root_domain' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_core_get_root_domain(); 
  7.  

Defined (1)

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

/bp-core/bp-core-functions.php  
  1. function bp_core_get_root_domain() { 
  2.  
  3. $domain = get_home_url( bp_get_root_blog_id() ); 
  4.  
  5. /** 
  6. * Filters the domain for the root blog. 
  7. * @since 1.0.1 
  8. * @param string $domain The domain URL for the blog. 
  9. */