From 37880027284824a646cdd08d1c857ce2bcc888d0 Mon Sep 17 00:00:00 2001
From: Sergey Biryukov <sergeybiryukov@git.wordpress.org>
Date: Thu, 3 Mar 2022 15:56:07 +0000
Subject: [PATCH] Networks and Sites: Suggest `wp_initialize_site` as an
 alternative for the deprecated `wpmu_new_blog` action.

The previously suggested alternative, `wp_insert_site`, does not get passed enough arguments and runs before the new site initialization routine is actually executed.

Follow-up to [43654].

Props asaquzzaman, henry.wright, MadtownLems.
Fixes #49612.

git-svn-id: https://develop.svn.wordpress.org/trunk@52816 602fd350-edb4-49c9-b593-d223f7449a82
---
 src/wp-includes/ms-site.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wp-includes/ms-site.php b/src/wp-includes/ms-site.php
index 6daee09d8a..4ce7fc4de3 100644
--- a/src/wp-includes/ms-site.php
+++ b/src/wp-includes/ms-site.php
@@ -136,7 +136,7 @@ function wp_insert_site( array $data ) {
 			'wpmu_new_blog',
 			array( $new_site->id, $user_id, $new_site->domain, $new_site->path, $new_site->network_id, $meta ),
 			'5.1.0',
-			'wp_insert_site'
+			'wp_initialize_site'
 		);
 	}