wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



wp_is_post_revision › WordPress Function

Od2.6.0
Przestarzałyn/a
wp_is_post_revision ( $post )
Parametry:
  • (int|WP_Post) $post Post ID or post object.
    Wymagane: Tak
Powrót:
  • (int|false) ID of revision's parent on success, false if not a revision.
Zdefiniowane na:
Codex:

Determines if the specified post is a revision.



Źródło

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

	if ( ! $post ) {
		return false;
	}

	return (int) $post->post_parent;
}