user_request_confirmed_email_headers
Filter HookDescription
Filters the headers of the user request confirmation email. }Hook Information
File Location |
wp-includes/user.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4366 |
Hook Parameters
Type | Name | Description |
---|---|---|
string|array
|
$headers
|
The email headers. |
string
|
$subject
|
The email subject. |
string
|
$content
|
The email content. |
int
|
$request_id
|
The request ID. |
array
|
$email_data
|
{ Data relating to the account action email. |
Usage Examples
Basic Usage
<?php
// Hook into user_request_confirmed_email_headers
add_filter('user_request_confirmed_email_headers', 'my_custom_filter', 10, 5);
function my_custom_filter($headers, $subject, $content, $request_id, $email_data) {
// Your custom filtering logic here
return $headers;
}
Source Code Context
wp-includes/user.php:4366
- How this hook is used in WordPress core
<?php
4361 * @type string $sitename The site name sending the mail.
4362 * @type string $siteurl The site URL sending the mail.
4363 * @type string $admin_email The administrator email receiving the mail.
4364 * }
4365 */
4366 $headers = apply_filters( 'user_request_confirmed_email_headers', $headers, $subject, $content, $request_id, $email_data );
4367
4368 $email_sent = wp_mail( $email_data['admin_email'], $subject, $content, $headers );
4369
4370 if ( $email_sent ) {
4371 update_post_meta( $request_id, '_wp_admin_notified', true );
PHP Documentation
<?php
/**
* Filters the headers of the user request confirmation email.
*
* @since 5.4.0
*
* @param string|array $headers The email headers.
* @param string $subject The email subject.
* @param string $content The email content.
* @param int $request_id The request ID.
* @param array $email_data {
* Data relating to the account action email.
*
* @type WP_User_Request $request User request object.
* @type string $user_email The email address confirming a request.
* @type string $description Description of the action being performed so the user knows what the email is for.
* @type string $manage_url The link to click manage privacy requests of this type.
* @type string $sitename The site name sending the mail.
* @type string $siteurl The site URL sending the mail.
* @type string $admin_email The administrator email receiving the mail.
* }
*/
Quick Info
- Hook Type: Filter
- Parameters: 5
- File: wp-includes/user.php
Related Hooks
Related hooks will be displayed here in future updates.