Multisite: Replace get_blog_details() in wp-admin/my-sites.php with get_site().

Props spacedmonkey, iamfriendly.
See #37102.
Fixes #38348.


git-svn-id: https://develop.svn.wordpress.org/trunk@38823 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2016-10-19 06:01:22 +00:00
parent d2b2c8e531
commit aa3662127f

View File

@ -23,7 +23,7 @@ $updated = false;
if ( 'updateblogsettings' == $action && isset( $_POST['primary_blog'] ) ) {
check_admin_referer( 'update-my-sites' );
$blog = get_blog_details( (int) $_POST['primary_blog'] );
$blog = get_site( (int) $_POST['primary_blog'] );
if ( $blog && isset( $blog->domain ) ) {
update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true );
$updated = true;