Filter hook 'newblog_notify_siteadmin'

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

View Source

newblog_notify_siteadmin

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

Hook Information

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

Hook Parameters

Type Name Description
string $msg Email body.
int|string $blog_id The new site's ID as an integer or numeric string.

Usage Examples

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

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

Source Code Context

wp-includes/ms-functions.php:1510 - How this hook is used in WordPress core
<?php
1505  	 * @since 5.4.0 The `$blog_id` parameter was added.
1506  	 *
1507  	 * @param string     $msg     Email body.
1508  	 * @param int|string $blog_id The new site's ID as an integer or numeric string.
1509  	 */
1510  	$msg = apply_filters( 'newblog_notify_siteadmin', $msg, $blog_id );
1511  
1512  	/* translators: New site notification email subject. %s: New site URL. */
1513  	wp_mail( $email, sprintf( __( 'New Site Registration: %s' ), $siteurl ), $msg );
1514  
1515  	return true;

PHP Documentation

<?php
/**
	 * Filters the message body of the new site activation email sent
	 * to the network administrator.
	 *
	 * @since MU (3.0.0)
	 * @since 5.4.0 The `$blog_id` parameter was added.
	 *
	 * @param string     $msg     Email body.
	 * @param int|string $blog_id The new site's ID as an integer or numeric string.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 2
  • File: wp-includes/ms-functions.php
Related Hooks

Related hooks will be displayed here in future updates.