Core Function
View Source on Trac ↗ wp_get_post_autosave()
wp_get_post_autosave( mixed $post_id, mixed $user_id = 0 ) Retrieves the autosaved data of the specified post.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $post_id int | The post ID. Required |
| $user_id int | Optional. The post author ID. Default 0. |
Return Value
((WP_Post)
| false) The autosaved data or false on failure or when no autosave exists.
Function Information
Since Version
2.6.0
Source File
wp-includes/revision.php
Advertisement