Summery Summery
Deletes a revision.
Syntax Syntax
Description Description
Deletes the row from the posts table corresponding to the specified revision.
Parameters Parameters
- $revision_id
-
(Required) Revision ID or revision object.
Return Return
(array|false|WP_Post|WP_Error|null) Null or WP_Error if error, deleted post if success.
Source Source
File: wp-includes/revision.php
do_action( 'wp_restore_post_revision', $post_id, $revision['ID'] ); return $post_id; } /** * Deletes a revision. * * Deletes the row from the posts table corresponding to the specified revision. * * @since 2.6.0 * * @param int|WP_Post $revision_id Revision ID or revision object. * @return array|false|WP_Post|WP_Error|null Null or WP_Error if error, deleted post if success. */ function wp_delete_post_revision( $revision_id ) { $revision = wp_get_post_revision( $revision_id ); if ( ! $revision ) { return $revision; }
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.6.0 | Introduced. |