wp_save_post_revision


wp_save_post_revision ( $post_id )

Parameters:
  • (int) post_id The ID of the post to save as a revision.
Returns:
  • (int|WP_Error|void) Void or 0 if error, new revision ID, if success.
Defined at:

Description

Creates a revision for the current version of a post.Typically used immediately after a post update, as every update is a revision, and the most recent revision always matches the current post.

Related Functions

wp_is_post_revision, wp_get_post_revision, wp_get_post_revisions, wp_restore_post_revision, wp_list_post_revisions

Top Google Results

User discussions

wpseek mobile