apply_filters( 'user_request_action_email_content', string $content, array $email_data )
- Since
- 4.9.6
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.
Compatibility
- WordPress
- since 4.9.6
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$contentstring- Text in the email.
$email_dataarray- { Data relating to the account action email.
@type WP_User_Request $request User request object.
@type string $email The email address this is being sent to.
@type string $description Description of the action being performed so the user knows what the email is for.
@type string $confirm_url The link to click on to confirm the account action.
@type string $sitename The site name sending the mail.
@type string $siteurl The site URL sending the mail.
}$requestWP_User_RequestUser request object.$emailstringThe email address this is being sent to.$descriptionstringDescription of the action being performed so the user knows what the email is for.$confirm_urlstringThe link to click on to confirm the account action.$sitenamestringThe site name sending the mail.$siteurlstringThe site URL sending the mail.
Where this hook fires · 1
wp-includes/user.php:5005wp_send_user_request()
Source code
* @type string $description Description of the action being performed so the user knows what the email is for. * @type string $confirm_url The link to click on to confirm the account action. * @type string $sitename The site name sending the mail. * @type string $siteurl The site URL sending the mail. * } */ $content = apply_filters( 'user_request_action_email_content', $content, $email_data ); $content = str_replace( '###DESCRIPTION###', $email_data['description'], $content ); $content = str_replace( '###CONFIRM_URL###', sanitize_url( $email_data['confirm_url'] ), $content ); $content = str_replace( '###EMAIL###', $email_data['email'], $content ); $content = str_replace( '###SITENAME###', $email_data['sitename'], $content ); $content = str_replace( '###SITEURL###', sanitize_url( $email_data['siteurl'] ), $content );Changelog
Introduced in 4.9.6. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.