Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_is_post_revision [ WordPress Function ]

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:



Determines if the specified post is a revision.

Source


<?php
function wp_is_post_revision$post ) {
    if ( !
$post wp_get_post_revision$post ) )
        return 
false;
    return (int) 
$post->post_parent;
}
?>

Examples [ wp-snippets.com ]

Top Google zoekresultaten

Meer ...

Gebruikersdiscussies [ wordpress.org ]

0 User Note(s)

Nog geen één. Wees de eerste!

Nieuw toevoegen ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics