newblog_notify_siteadmin()

 

File: wp-includes/ms-functions.php

function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {
	if ( is_object( $blog_id ) ) {
		$blog_id = $blog_id->blog_id;
	}

	if ( get_site_option( 'registrationnotification' ) != 'yes' ) {
		return false;
	}

	$email = get_site_option( 'admin_email' );
	if ( is_email( $email ) == false ) {
		return false;
	}

	$options_site_url = esc_url( network_admin_url( 'settings.php' ) );

	switch_to_blog( $blog_id );
	$blogname = get_option( 'blogname' );
	$siteurl  = site_url();
	restore_current_blog();

	/* translators: New site notification email. 1: Site URL, 2: User IP address, 3: Settings screen URL */
	$msg = sprintf(
		__(
			'New Site: %1$s
URL: %2$s
Remote IP address: %3$s

Disable these notifications: %4$s'
		),
		$blogname,
		$siteurl,
		wp_unslash( $_SERVER['REMOTE_ADDR'] ),
		$options_site_url
	);
	/**
	 * Filters the message body of the new site activation email sent
	 * to the network administrator.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string $msg Email body.
	 */
	$msg = apply_filters( 'newblog_notify_siteadmin', $msg );

	wp_mail( $email, sprintf( __( 'New Site Registration: %s' ), $siteurl ), $msg );
	return true;
}

参数:newblog_notify_siteadmin( WP_Site|int $blog_id, string $deprecated = '' )

筛选‘newblog_notify_siteadmin’以更改通知电子邮件的内容。

The new site's object or ID.Not used.

(布尔)

$blog_id

(WP_Site|int)
(Required)
The new site's object or ID.

$deprecated

(string)
(Optional)
Not used.

Default value: ''

{acontent3}

You must log in before being able to contribute a note or feedback.

11.11% (1) 次Baidu访问
11.11% (1) 次Google访问
77.78% (7) 次Sogou访问
  • 蜘蛛:Baidu,1次,更新时间:2019-04-24 20:15:41
  • 蜘蛛:Google,1次,更新时间:2019-05-06 08:06:11
  • 蜘蛛:Sogou,7次,更新时间:2019-05-18 14:21:59

参与评论