WordPress at a glance
function is not described

update_blog_status() WP 3.0.0

Update a blog details field.

  • Global. wpdb. $wpdb WordPress database abstraction object.
  • Since 5.1.0 Use wp_update_site() internally.

No Hooks.

Return

String/false. $value

Usage

update_blog_status( $blog_id, $pref, $value, $deprecated );
$blog_id(int) (required)
BLog ID
$pref(string) (required)
A field name
$value(string) (required)
Value for $pref
$deprecated(null)

Default: null

Code of update blog status: wp-includes/ms-blogs.php VER 5.1.1

<?php
function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
	global $wpdb;

	if ( null !== $deprecated ) {
		_deprecated_argument( __FUNCTION__, '3.1.0' );
	}

	if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id' ) ) ) {
		return $value;
	}

	$result = wp_update_site(
		$blog_id,
		array(
			$pref => $value,
		)
	);

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

	return $value;
}