Multisite: Adjust site count of the correct network after having created a new site.

Prior to this change, after creating a site, the network site count was always refreshed on the current network, regardless of whether the site was created on a different network. With the recent changes, particularly [40591], it is now possible to update the site count for a specific `$network_id`, so this changeset makes use of the new parameter.

Fixes #38699.


git-svn-id: https://develop.svn.wordpress.org/trunk@40612 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Felix Arntz
2017-05-10 23:21:43 +00:00
parent 883c0b04a9
commit 9d2d5b536d
2 changed files with 20 additions and 1 deletions

View File

@@ -1375,7 +1375,7 @@ function insert_blog($domain, $path, $site_id) {
$blog_id = $wpdb->insert_id;
refresh_blog_details( $blog_id );
wp_maybe_update_network_site_counts();
wp_maybe_update_network_site_counts( $site_id );
return $blog_id;
}