wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_is_post_revision › WordPress Function

Desde2.6.0
Obsoleton/a
wp_is_post_revision ( $post )
Parâmetros:
  • (int|WP_Post) $post Post ID or post object.
    Required: Yes
Retorna:
  • (int|false) ID of revision's parent on success, false if not a revision.
Definido em:
Codex:

Determines if the specified post is a revision.



Fonte

function wp_is_post_revision( $post ) {
	$post = wp_get_post_revision( $post );

	if ( ! $post ) {
		return false;
	}

	return (int) $post->post_parent;
}