WordPress开发者和主题制作者的搜索引擎



update_blog_details ›

Since3.0.0
已弃用n/a
update_blog_details ( $blog_id, $details = array() )
参数: (2)
  • (int) $blog_id Blog ID
    Required: Yes
  • (array) $details Array of details keyed by blogs table field names.
    Required: No
    默认: array()
返回:
  • (bool) True if update succeeds, false otherwise.
定义在:
文档:
Change Log:
  • MU

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



源码

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