Filter hook 'newuser_notify_siteadmin'

in WP Core File wp-includes/ms-functions.php at line 1566

View Source

newuser_notify_siteadmin

Filter Hook
Description
Filters the message body of the new user activation email sent to the network administrator.

Hook Information

File Location wp-includes/ms-functions.php View on GitHub
Hook Type Filter
Line Number 1566

Hook Parameters

Type Name Description
string $msg Email body.
WP_User $user WP_User instance of the new user.

Usage Examples

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

function my_custom_filter($msg, $user) {
    // Your custom filtering logic here
    return $msg;
}

Source Code Context

wp-includes/ms-functions.php:1566 - How this hook is used in WordPress core
<?php
1561  	 * @since MU (3.0.0)
1562  	 *
1563  	 * @param string  $msg  Email body.
1564  	 * @param WP_User $user WP_User instance of the new user.
1565  	 */
1566  	$msg = apply_filters( 'newuser_notify_siteadmin', $msg, $user );
1567  
1568  	/* translators: New user notification email subject. %s: User login. */
1569  	wp_mail( $email, sprintf( __( 'New User Registration: %s' ), $user->user_login ), $msg );
1570  
1571  	return true;

PHP Documentation

<?php
/**
	 * Filters the message body of the new user activation email sent
	 * to the network administrator.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string  $msg  Email body.
	 * @param WP_User $user WP_User instance of the new user.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/ms-functions.php
Related Hooks

Related hooks will be displayed here in future updates.