bp_signup_get_subdomain_base

Return the base URL for subdomain installations of WordPress Multisite.

Description

(string) bp_signup_get_subdomain_base(); 

Replaces bp_blogs_get_subdomain_base()

Returns (string)

The base URL - eg, 'example.com' for site_url() example.com or www.example.com.


Usage

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

Defined (1)

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

/bp-members/bp-members-template.php  
  1. function bp_signup_get_subdomain_base() { 
  2. global $current_site; 
  3.  
  4. // In case plugins are still using this filter. 
  5. $subdomain_base = apply_filters( 'bp_blogs_subdomain_base', preg_replace( '|^www\.|', '', $current_site->domain ) . $current_site->path ); 
  6.  
  7. /** 
  8. * Filters the base URL for subdomain installations of WordPress Multisite. 
  9. * @since 2.1.0 
  10. * @param string $subdomain_base The base URL - eg, 'example.com' for 
  11. * site_url() example.com or www.example.com. 
  12. */ 
  13. return apply_filters( 'bp_signup_subdomain_base', $subdomain_base );