Switch language

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




wp_delete_post_revision [ WordPress Function ]

wp_delete_post_revision ( $revision_id )
Parameters:
  • (int|object) $revision_id Revision ID or revision object.
Uses:
Returns:
  • (mixed) Null or WP_Error if error, deleted post if success.
Defined at:



Deletes a revision.

Deletes the row from the posts table corresponding to the specified revision.

Source


<?php
function wp_delete_post_revision$revision_id ) {
    if ( !
$revision wp_get_post_revision$revision_id ) )
        return 
$revision;

    
$delete wp_delete_post$revision->ID );
    if ( 
is_wp_error$delete ) )
        return 
$delete;

    if ( 
$delete )
        
do_action'wp_delete_post_revision'$revision->ID$revision );

    return 
$delete;
}
?>

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