bp_email_wp_user_request_action_email_content( string $email_text, array $email_data )
Filters the text of the email sent when an account action is attempted.
Description
The following strings have a special meaning and will get replaced dynamically:
DESCRIPTION### Description of the action being performed so the user knows what the email is for.
CONFIRM_URL### The link to click on to confirm the account action.
SITENAME### The name of the site.
SITEURL### The URL to the site.
Parameters
- $email_text
-
(Required) Text in the email.
- $email_data
-
(Required) Data relating to the account action email.
- 'request'
(WP_User_Request) User request object. - 'email'
(string) The email address this is being sent to. - 'description'
(string) Description of the action being performed so the user knows what the email is for. - 'confirm_url'
(string) The link to click on to confirm the account action. - 'sitename'
(string) The site name sending the mail. - 'siteurl'
(string) The site URL sending the mail.
- 'request'
Source
File: bp-core/bp-core-wp-emails.php
function bp_email_wp_user_request_action_email_content( $email_text, $email_data ) { /* translators: Do not translate DESCRIPTION, CONFIRM_URL, SITENAME, SITEURL: those are placeholders. */ $email_text = '<p>' . __( 'Howdy,', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'A request has been made to perform the following action on your account: <br />###DESCRIPTION###', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'To confirm this, please click on the following link: <br /><a href="###CONFIRM_URL###">###CONFIRM_URL###</a>', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'You can safely ignore and delete this email if you do not want to take this action.', 'buddyboss' ) . '</p>'; $email_text .= '<p>' . __( 'Regards, <br />All at <a href="###SITEURL###">###SITENAME###</a> <br /><a href="###SITEURL###">###SITEURL###</a>', 'buddyboss' ) . '</p>'; add_filter( 'wp_mail_content_type', 'bp_email_set_content_type' ); //add this to support html in email $email_text = bp_email_core_wp_get_template( $email_text, get_user_by( 'email', $email_data['email'] ) ); return $email_text; }
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.