Filter hook 'user_request_action_email_subject'

in WP Core File wp-includes/user.php at line 4850

View Source

user_request_action_email_subject

Filter Hook
Description
Filters the subject of the email sent when an account action is attempted. }

Hook Information

File Location wp-includes/user.php View on GitHub
Hook Type Filter
Line Number 4850

Hook Parameters

Type Name Description
string $subject The email subject.
string $sitename The name of the site.
array $email_data { Data relating to the account action email.

Usage Examples

Basic Usage
<?php
// Hook into user_request_action_email_subject
add_filter('user_request_action_email_subject', 'my_custom_filter', 10, 3);

function my_custom_filter($subject, $sitename, $email_data) {
    // Your custom filtering logic here
    return $subject;
}

Source Code Context

wp-includes/user.php:4850 - How this hook is used in WordPress core
<?php
4845  	 *     @type string          $confirm_url The link to click on to confirm the account action.
4846  	 *     @type string          $sitename    The site name sending the mail.
4847  	 *     @type string          $siteurl     The site URL sending the mail.
4848  	 * }
4849  	 */
4850  	$subject = apply_filters( 'user_request_action_email_subject', $subject, $email_data['sitename'], $email_data );
4851  
4852  	/* translators: Do not translate DESCRIPTION, CONFIRM_URL, SITENAME, SITEURL: those are placeholders. */
4853  	$content = __(
4854  		'Howdy,
4855  

PHP Documentation

<?php
/**
	 * Filters the subject of the email sent when an account action is attempted.
	 *
	 * @since 4.9.6
	 *
	 * @param string $subject    The email subject.
	 * @param string $sitename   The name of the site.
	 * @param array  $email_data {
	 *     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.
	 * }
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 3
  • File: wp-includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.