wppaste
WordPress

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_Request

    User request object.
  • $emailstring

    The email address this is being sent to.
  • $descriptionstring

    Description of the action being performed so the user knows what the email is for.
  • $confirm_urlstring

    The link to click on to confirm the account action.
  • $sitenamestring

    The site name sending the mail.
  • $siteurlstring

    The site URL sending the mail.

Where this hook fires · 1

  • wp-includes/user.php:4840wp_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.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.7.7 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.