wp/wp-admin/network/site-new.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
--- a/wp/wp-admin/network/site-new.php	Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-admin/network/site-new.php	Wed Sep 21 18:19:35 2022 +0200
@@ -145,31 +145,7 @@
 			update_user_option( $user_id, 'primary_blog', $id, true );
 		}
 
-		wp_mail(
-			get_site_option( 'admin_email' ),
-			sprintf(
-				/* translators: New site notification email subject. %s: Network title. */
-				__( '[%s] New Site Created' ),
-				get_network()->site_name
-			),
-			sprintf(
-				/* translators: New site notification email. 1: User login, 2: Site URL, 3: Site title. */
-				__(
-					'New site created by %1$s
-
-Address: %2$s
-Name: %3$s'
-				),
-				$current_user->user_login,
-				get_site_url( $id ),
-				wp_unslash( $title )
-			),
-			sprintf(
-				'From: "%1$s" <%2$s>',
-				_x( 'Site Admin', 'email "From" field' ),
-				get_site_option( 'admin_email' )
-			)
-		);
+		wpmu_new_site_admin_notification( $id, $user_id );
 		wpmu_welcome_notification( $id, $user_id, $password, $title, array( 'public' => 1 ) );
 		wp_redirect(
 			add_query_arg(
@@ -225,7 +201,7 @@
 );
 ?>
 </p>
-<form method="post" action="<?php echo network_admin_url( 'site-new.php?action=add-site' ); ?>" novalidate="novalidate">
+<form method="post" action="<?php echo esc_url( network_admin_url( 'site-new.php?action=add-site' ) ); ?>" novalidate="novalidate">
 <?php wp_nonce_field( 'add-blog', '_wpnonce_add-blog' ); ?>
 	<table class="form-table" role="presentation">
 		<tr class="form-field form-required">