wp_restore_post_revision


wp_restore_post_revision ( $revision, $fields = null )

Parameters:
  • (int|WP_Post) revision Revision ID or revision object.
  • (array) fields Optional. What fields to restore from. Defaults to all.
Returns:
  • (int|false|null) Null if error, false if no fields to restore, (int) post ID if success.
Defined at:

Description

Restores a post to the specified revision.Can restore a past revision using all fields of the post revision, or only selected fields.

Related Functions

wp_restore_post_revision_meta, wp_get_post_revision, wp_delete_post_revision, wp_get_post_revisions, wp_is_post_revision

Top Google Results

User discussions

wpseek mobile