bp_email_newblog_notify_siteadmin( string $msg )

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

Description

Parameters

$msg

(Required) Email body.

Source

File: bp-core/bp-core-wp-emails.php

	function bp_email_newblog_notify_siteadmin( $msg ) {

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

		$options_site_url = esc_url(network_admin_url('settings.php'));
		$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 = '<p>' . sprintf( __( 'New Site: %1$s', 'buddyboss' ), $blogname ) . '</p>';
		$msg .= '<p>' . sprintf( __( 'URL: %2$s', 'buddyboss' ), $siteurl ) . '</p>';
		$msg .= '<p>' . sprintf( __( 'Remote IP address: %3$s', 'buddyboss' ), wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) . '</p>';
		$msg .= '<p>' . sprintf( __( 'Disable these notifications: %4$s', 'buddyboss' ), $options_site_url ) . '</p>';

		add_filter( 'wp_mail_content_type', 'bp_email_set_content_type' ); //add this to support html in email

		$msg = bp_email_core_wp_get_template( $msg, get_user_by( 'email', $email ) );

		return $msg;
	}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.