WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/wp delete post revision

Contents

Description

Deletes a revision.

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

Usage

<?php wp_delete_post_revision$revision_id ); ?>

Parameters

$revision_id
(int|object) (required) Revision ID or revision object.
Default: None

Return Values

(mixed) 
Null or WP_Error if error, deleted post if success.

Change Log

Since: 2.6

Source File

wp_delete_post_revision() is located in wp-includes/revision.php