if ( !
current_user_can( 'edit_post',
$revision->post_parent
) ) { return new IXR_Error( 401,
__( 'Sorry, you are not allowed to edit this post.'
) );
} // Check if revisions are disabled.
if ( !
wp_revisions_enabled( $post ) ) { return new IXR_Error( 401,
__( 'Sorry, revisions are disabled.'
) );
} $post =
wp_restore_post_revision( $revision_id );
return (bool) $post;
} /*
* Blogger API functions.
* Specs on http://plant.blogger.com/api and https://groups.yahoo.com/group/bloggerDev/
*/
/**
* Retrieves blogs that user owns.
*
* Will make more sense once we support multiple blogs.
*
* @since 1.5.0
*
* @param array $args {
* Method arguments. Note: arguments must be ordered as documented.
*
* @type int $0 Blog ID (unused).
* @type string $1 Username.
* @type string $2 Password.
* }
* @return array|IXR_Error
*/