wppaste
WordPress

apply_filters( 'user_request_action_email_headers', string|array $headers, string $subject, string $content, int $request_id, array $email_data )

Since
5.4.0
Filters the headers of the email sent when an account action is attempted.

Compatibility

WordPress
since 5.4.0
  • 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

$headersstring|array
The email headers.
$subjectstring
The email subject.
$contentstring
The email content.
$request_idint
The request ID.
$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:4935wp_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.	 * }	 */	$headers = apply_filters( 'user_request_action_email_headers', $headers, $subject, $content, $request_id, $email_data ); 	$email_sent = wp_mail( $email_data['email'], $subject, $content, $headers ); 	if ( $switched_locale ) {		restore_previous_locale();	}

Changelog

Introduced in 5.4.0. 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.8.8 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.