bp_email_update_welcome_email( string $welcome_email, int $blog_id, int $user_id, string $password, string $title, array $meta )
Filters the content of the welcome email after site activation.
Description
Content should be formatted for transmission via wp_mail().
Parameters
- $welcome_email
-
(Required) Message body of the email.
- $blog_id
-
(Required) Blog ID.
- $user_id
-
(Required) User ID.
- $password
-
(Required) User password.
- $title
-
(Required) Site title.
- $meta
-
(Required) Signup meta data. By default, contains the requested privacy setting and lang_id.
Source
File: bp-core/bp-core-wp-emails.php
1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 | function bp_email_update_welcome_email( $welcome_email , $blog_id , $user_id , $password , $title , $meta ) { if ( $welcome_email == false ) { /* translators: Do not translate USERNAME, SITE_NAME, BLOG_URL, PASSWORD: those are placeholders. */ $welcome_email = '<p>' . __( 'Howdy USERNAME,' , 'buddyboss' ) . '</p>' ; $welcome_email .= '<p>' . __( 'Your new SITE_NAME site has been successfully set up at: <br />BLOG_URL' , 'buddyboss' ) . '</p>' ; $welcome_email .= '<p>' . __( 'You can log in to the administrator account with the following information:' , 'buddyboss' ) . '</p>' ; $welcome_email .= '<p>' . __( 'Username: USERNAME' , 'buddyboss' ) . '</p>' ; $welcome_email .= '<p>' . __( 'Password: PASSWORD' , 'buddyboss' ) . '</p>' ; $welcome_email .= '<p>' . __( 'Log in here: BLOG_URLwp-login.php' , 'buddyboss' ) . '</p>' ; $welcome_email .= '<p>' . __( 'We hope you enjoy your new site. Thanks! <br />--The Team @ SITE_NAME' , 'buddyboss' ) . '</p>' ; } add_filter( 'wp_mail_content_type' , 'bp_email_set_content_type' ); //add this to support html in email $welcome_email = bp_email_core_wp_get_template( $welcome_email , get_userdata( $user_id ) ); return $welcome_email ; } |
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.