function wp_get_post_autosave( $post_id ) {}

Retrieve the autosaved data of the specified post.
Returns a post object containing the information that was autosaved for the specified post.


  • int $post_id: The post ID.

Return values

returns:The autosaved data or false on failure or when no autosave exists.

Source code

function wp_get_post_autosave( $post_id ) {

	if ( !$post = get_post( $post_id ) )

		return false;

	$q = array(

		'name' => "{$post->ID}-autosave",



No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: