Determines if the specified post is a revision.
Parameters
$post
int|WP_Postrequired- Post ID or post object.
Source
function wp_is_post_revision( $post ) {
$post = wp_get_post_revision( $post );
if ( ! $post ) {
return false;
}
return (int) $post->post_parent;
}
Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.