wp_get_post_autosave


wp_get_post_autosave ( $post_id, $user_id = 0 )

Parameters:
  • (int) post_id The post ID.
  • (int) user_id Optional. The post author ID. Default 0.
Returns:
  • (WP_Post|false) The autosaved data or false on failure or when no autosave exists.
Defined at:

Description

Retrieves the autosaved data of the specified post.Returns a post object with the information that was autosaved for the specified post. If the optional $user_id is passed, returns the autosave for that user, otherwise returns the latest autosave.

Related Functions

wp_create_post_autosave, wp_is_post_autosave, wp_get_post_cats, wp_set_post_cats, wp_get_post_tags

Top Google Results

User discussions

wpseek mobile