Advertisements

newblog_notify_siteadmin

Definition:
function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {}

Notifies the network admin that a new site has been activated.
Filter ‘newblog_notify_siteadmin’ to change the content of the notification email.

Parameters

  • int $blog_id: The new site’s ID.
  • $deprecated

Defined filters

  • newblog_notify_siteadmin
    apply_filters( 'newblog_notify_siteadmin', $msg )

Source code

function newblog_notify_siteadmin( $blog_id, $deprecated = '' ) {

	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();



	$msg = sprintf( __( 'New Site: %1s

URL: %2s

Remote IP: %3s



Disable these notifications: %4s' ), $blogname, $siteurl, $_SERVER['REMOTE_ADDR'], $options_site_url);

	$msg = apply_filters( 'newblog_notify_siteadmin', $msg );



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

	return true;

}

2433

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: