update_blog_details( int $blog_id, array $details = array() ): bool

In this article

Updates the details for a blog and the blogs table for a given blog ID.

Parameters

$blog_idintrequired
Blog ID.
$detailsarrayoptional
Array of details keyed by blogs table field names.

Default:array()

Return

bool True if update succeeds, false otherwise.

Source

function update_blog_details( $blog_id, $details = array() ) {
	global $wpdb;

	if ( empty( $details ) ) {
		return false;
	}

	if ( is_object( $details ) ) {
		$details = get_object_vars( $details );
	}

	$site = wp_update_site( $blog_id, $details );

	if ( is_wp_error( $site ) ) {
		return false;
	}

	return true;
}

Changelog

VersionDescription
MU (3.0.0)Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.