Uses
| Uses | Description | 
|---|---|
| wp-includes/revision.php: wp_get_post_revision() | Gets a post revision. | 
Determines if the specified post is an autosave.
(int|WP_Post) (Required) Post ID or post object.
(int|false) ID of autosave's parent on success, false if not a revision.
File: wp-includes/revision.php
function wp_is_post_autosave( $post ) {
	$post = wp_get_post_revision( $post );
	if ( ! $post ) {
		return false;
	}
	if ( false !== strpos( $post->post_name, "{$post->post_parent}-autosave" ) ) {
		return (int) $post->post_parent;
	}
	return false;
}  | Version | Description | 
|---|---|
| 2.6.0 | Introduced. | 
    © 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
    https://developer.wordpress.org/reference/functions/wp_is_post_autosave