bp_core_activation_signup_blog_notification

Notify new users of a successful registration (with blog).

Description

bp_core_activation_signup_blog_notification( (string) $domain, (string) $path, (string) $title, (string) $user, (string) $user_email, (string) $key ); 

This function filter's WP's wpmu_signup_blog_notification,, and replaces WP's default welcome email with a BuddyPress-specific message.

Parameters (6)

0. $domain (string)
The new blog domain.
1. $path (string)
The new blog path.
2. $title (string)
The site title.
3. $user (string)
The user's login name.
4. $user_email (string)
The user's email address.
5. $key (string)
The activation key created in wpmu_signup_blog().

Usage

  1. if ( !function_exists( 'bp_core_activation_signup_blog_notification' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/bp-core-filters.php'; 
  3.  
  4. // The new blog domain. 
  5. $domain = ''; 
  6.  
  7. // The new blog path. 
  8. $path = ''; 
  9.  
  10. // The site title. 
  11. $title = ''; 
  12.  
  13. // The user's login name. 
  14. $user = ''; 
  15.  
  16. // The user's email address. 
  17. $user_email = ''; 
  18.  
  19. // The activation key created in wpmu_signup_blog(). 
  20. $key = ''; 
  21.  
  22. // NOTICE! Understand what this does before running. 
  23. $result = bp_core_activation_signup_blog_notification($domain, $path, $title, $user, $user_email, $key); 
  24.  

Defined (1)

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

/bp-core/bp-core-filters.php  
  1. function bp_core_activation_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key ) { 
  2. $args = array( 
  3. 'tokens' => array( 
  4. 'activate-site.url' => esc_url( bp_get_activation_page() . '?key=' . urlencode( $key ) ),  
  5. 'domain' => $domain,  
  6. 'key_blog' => $key,  
  7. 'path' => $path,  
  8. 'user-site.url' => esc_url( "http://{$domain}{$path}" ),  
  9. 'title' => $title,  
  10. 'user.email' => $user_email,  
  11. ),  
  12. ); 
  13. bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $user ) ), $args ); 
  14.  
  15. // Return false to stop the original WPMU function from continuing. 
  16. return false;