apply_filters( 'invited_user_email', array $new_user_email, int $user_id, array $role, string $newuser_key )
- Since
- 5.6.0
Filters the contents of the email sent when an existing user is invited to join the site.
Compatibility
- WordPress
- since 5.6.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
$new_user_emailarray- { Used to build wp_mail().
@type string $to The email address of the invited user.
@type string $subject The subject of the email.
@type string $message The content of the email.
@type string $headers Headers.
}$tostringThe email address of the invited user.$subjectstringThe subject of the email.$messagestringThe content of the email.$headersstringHeaders.
$user_idint- The invited user's ID.
$rolearray- Array containing role information for the invited user.
$newuser_keystring- The key of the invitation.
Where this hook fires · 1
wp-admin/user-new.php:167file scope
Source code
<?php * } * @param int $user_id The invited user's ID. * @param array $role Array containing role information for the invited user. * @param string $newuser_key The key of the invitation. * */ $new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key ); wp_mail( $new_user_email['to'], $new_user_email['subject'], $new_user_email['message'], $new_user_email['headers']Changelog
Introduced in 5.6.0. 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 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.