wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



update_blog_details › WordPress Function

Depuis
Dépréciéen/a
update_blog_details ( $blog_id, $details = array() )
Paramètres: (2)
  • (int) $blog_id Blog ID.
    Requis: Oui
  • (array) $details Array of details keyed by blogs table field names.
    Requis: Non
    Défaut: array()
Retourne:
  • (bool) True if update succeeds, false otherwise.
Défini(e) dans:
Codex:
Changelog:
  • MU

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



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