/**
* Determines if the specified post is a revision.
*
* @since 2.6.0
*
* @param int|WP_Post $post Post ID or post object.
* @return int|false ID of revision's parent on success, false if not a revision.
*/
function wp_is_post_revision( $post ) { $post =
wp_get_post_revision( $post );
if ( !
$post ) { return false;
} return (int) $post->post_parent;
}/**
* Determines if the specified post is an autosave.
*
* @since 2.6.0
*
* @param int|WP_Post $post Post ID or post object.
* @return int|false ID of autosave's parent on success, false if not a revision.
*/