wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_is_post_revision › WordPress Function

Da2.6.0
Deprecaton/a
wp_is_post_revision ( $post )
Parametri:
  • (int|WP_Post) $post Post ID or post object.
    Richiesto:
Ritorna:
  • (int|false) ID of revision's parent on success, false if not a revision.
Definito a:
Codex:

Determines if the specified post is a revision.



Sorgenti

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

	if ( ! $post ) {
		return false;
	}

	return (int) $post->post_parent;
}