wp_restore_post_revision


wp_restore_post_revision ( $revision_id, $fields = null )

Parameters:
  • (int|WP_Post) $revision_id 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_get_post_revision, wp_delete_post_revision, wp_is_post_revision, wp_save_post_revision, wp_get_post_revisions

Top Google Results

User discussions

wpseek mobile