bp_get_root_domain

Return the "root domain", the URL of the BP root blog.

Description

(string) bp_get_root_domain(); 

Returns (string)

URL of the BP root blog.


Usage

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

Defined (1)

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

/bp-core/bp-core-template.php  
  1. function bp_get_root_domain() { 
  2. $bp =buddypress); 
  3.  
  4. if ( ! empty( $bp->root_domain ) ) { 
  5. $domain = $bp->root_domain; 
  6. } else { 
  7. $domain = bp_core_get_root_domain(); 
  8. $bp->root_domain = $domain; 
  9.  
  10. /** 
  11. * Filters the "root domain", the URL of the BP root blog. 
  12. * @since 1.2.4 
  13. * @param string $domain URL of the BP root blog. 
  14. */ 
  15. return apply_filters( 'bp_get_root_domain', $domain );