bp_blogs_confirm_blog_signup

Display a message after successful blog registration.

Description

bp_blogs_confirm_blog_signup( (string) $domain, (string) $path, (string) $blog_title, (string) $user_name, (string) $user_email = '', (string) $meta = '', (null) $blog_id = null ); 

Parameters (7)

0. $domain (string)
The new blog's domain.
1. $path (string)
The new blog's path.
2. $blog_title (string)
The new blog's title.
3. $user_name (string)
The user name of the user who created the blog. Unused.
4. $user_email — Optional. (string) => ''
The email of the user who created the blog. Unused.
5. $meta — Optional. (string) => ''
Meta values associated with the new blog. Unused.
6. $blog_id — Optional. (null) => null
ID of the newly created blog.

Usage

  1. if ( !function_exists( 'bp_blogs_confirm_blog_signup' ) ) { 
  2. require_once '/bp-blogs/bp-blogs-template.php'; 
  3.  
  4. // The new blog's domain. 
  5. $domain = ''; 
  6.  
  7. // The new blog's path. 
  8. $path = ''; 
  9.  
  10. // The new blog's title. 
  11. $blog_title = ''; 
  12.  
  13. // The user name of the user who created the blog. Unused. 
  14. $user_name = ''; 
  15.  
  16. // The email of the user who created the blog. Unused. 
  17. $user_email = ''; 
  18.  
  19. // Meta values associated with the new blog. Unused. 
  20. $meta = ''; 
  21.  
  22. // ID of the newly created blog. 
  23. $blog_id = null; 
  24.  
  25. // NOTICE! Understand what this does before running. 
  26. $result = bp_blogs_confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta, $blog_id); 
  27.  

Defined (1)

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

/bp-blogs/bp-blogs-template.php  
  1. function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '', $blog_id = null ) { 
  2. switch_to_blog( $blog_id ); 
  3. $blog_url = set_url_scheme( home_url() ); 
  4. $login_url = set_url_scheme( wp_login_url() ); 
  5. restore_current_blog(); 
  6.  
  7. ?> 
  8. <p><?php _e( 'Congratulations! You have successfully registered a new site.', 'buddypress' ) ?></p> 
  9. <p> 
  10. <?php printf( 
  11. '%s %s',  
  12. sprintf( 
  13. __( '%s is your new site.', 'buddypress' ),  
  14. sprintf( '<a href="%s">%s</a>', esc_url( $blog_url ), esc_url( $blog_url ) ) 
  15. ),  
  16. sprintf( 
  17. /** translators: 1: Login URL, 2: User name */ 
  18. __( '<a href="%1$s">Log in</a> as "%2$s" using your existing password.', 'buddypress' ),  
  19. esc_url( $login_url ),  
  20. esc_html( $user_name ) 
  21. ); ?> 
  22. </p> 
  23.  
  24. <?php 
  25.  
  26. /** 
  27. * Fires after the default successful blog registration message markup. 
  28. * @since 1.0.0 
  29. */ 
  30. do_action('signup_finished');