Un motore di ricerca WordPress per sviluppatori e autori di temi



update_blog_details ›

Da3.0.0
Deprecaton/a
update_blog_details ( $blog_id, $details = array() )
Parametri: (2)
  • (int) $blog_id Blog ID
    Richiesto:
  • (array) $details Array of details keyed by blogs table field names.
    Richiesto: No
    Default: array()
Ritorna:
  • (bool) True if update succeeds, false otherwise.
Definito a:
Codex:
ChangeLog:
  • MU

Update the details for a blog. Updates the blogs table for a given blog id.



Sorgenti

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;
}