Change the name of a blog

This snippet shows how to change the name of a blog in the list of blogs that the user can write to.

// 100 is to do things last.
add_action( 'threewp_broadcast_get_user_writable_blogs', 'my_threewp_broadcast_get_user_writable_blogs', 100 );
function my_threewp_broadcast_get_user_writable_blogs( $action )
{
	// Rename only blog #69
	if ( ! $action->blogs->has( 69 ) )
		return;
	// Retrieve the blog from the collection.
	$blog = $action->blogs->get( 69 );
	$blog->blogname = 'This is the new name';
	// No need to set the blog into the collection again since we are working with the reference.
}