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: - Introduced in WordPress: 2.6.0
- Deprecated in WordPress: —
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.