Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




wp_is_post_revision [ ]

wp_is_post_revision ( $post )
Parameters:
  • (int|object) $post Post ID or post object.
Returns:
  • (bool|int) False if not a revision, ID of revision's parent otherwise.
Defined at:
Codex



Determines if the specified post is a revision.

Source

function wp_is_post_revision( $post ) {
	if ( !$post = wp_get_post_revision( $post ) )
		return false;

	return (int) $post->post_parent;
}

Top Google Search Results

More ...

User discussions [ wordpress.org ]

User Note(s)