wp_new_user_notification_email_admin
Filter HookDescription
Filters the contents of the new user notification email sent to the site admin. }Hook Information
File Location |
wp-includes/pluggable.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2236 |
Hook Parameters
Type | Name | Description |
---|---|---|
array
|
$wp_new_user_notification_email_admin
|
{ Used to build wp_mail(). |
WP_User
|
$user
|
User object for new user. |
string
|
$blogname
|
The site title. |
Usage Examples
Basic Usage
<?php
// Hook into wp_new_user_notification_email_admin
add_filter('wp_new_user_notification_email_admin', 'my_custom_filter', 10, 3);
function my_custom_filter($wp_new_user_notification_email_admin, $user, $blogname) {
// Your custom filtering logic here
return $wp_new_user_notification_email_admin;
}
Source Code Context
wp-includes/pluggable.php:2236
- How this hook is used in WordPress core
<?php
2231 * @type string $headers The headers of the email.
2232 * }
2233 * @param WP_User $user User object for new user.
2234 * @param string $blogname The site title.
2235 */
2236 $wp_new_user_notification_email_admin = apply_filters( 'wp_new_user_notification_email_admin', $wp_new_user_notification_email_admin, $user, $blogname );
2237
2238 wp_mail(
2239 $wp_new_user_notification_email_admin['to'],
2240 wp_specialchars_decode( sprintf( $wp_new_user_notification_email_admin['subject'], $blogname ) ),
2241 $wp_new_user_notification_email_admin['message'],
PHP Documentation
<?php
/**
* Filters the contents of the new user notification email sent to the site admin.
*
* @since 4.9.0
*
* @param array $wp_new_user_notification_email_admin {
* Used to build wp_mail().
*
* @type string $to The intended recipient - site admin email address.
* @type string $subject The subject of the email.
* @type string $message The body of the email.
* @type string $headers The headers of the email.
* }
* @param WP_User $user User object for new user.
* @param string $blogname The site title.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/pluggable.php
Related Hooks
Related hooks will be displayed here in future updates.