bp_blog_signup_enabled

Checks whether blog creation is enabled.

Description

bp_blog_signup_enabled(); 

Returns true when blog creation is enabled for logged-in users only, or when it's enabled for new registrations.


Usage

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

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_blog_signup_enabled() { 
  2. $bp =buddypress); 
  3.  
  4. $active_signup = isset( $bp->site_options['registration'] ) 
  5. ? $bp->site_options['registration'] 
  6. : 'all'; 
  7.  
  8. /** 
  9. * Filters whether or not blog creation is enabled. 
  10. * Return "all", "none", "blog" or "user". 
  11. * @since 1.0.0 
  12. * @param string $active_signup Value of the registration site option creation status. 
  13. */ 
  14. $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); 
  15.  
  16. if ( 'none' == $active_signup || 'user' == $active_signup ) 
  17. return false; 
  18.  
  19. return true;