wp_save_post_revision( int $post_id )

Creates a revision for the current version of a post.


9 related functions found for: wp_save_post_revision

Top ↑

Related terms found for this post

TaxonomyTerms
wp-parser-related-wordspost, post-typ, post-type, revis, revision, revision-php, save, wp-includes, wp-save
wp-parser-packagePost_Revisions, WordPress
wp-parser-source-filewp-includes/revision.php

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • post
  • Post_Revisions
  • post-typ
  • post-type
  • revis
  • revision
  • revision-php
  • save
  • wp-includes
  • wp-includes/revision.php
  • wp-save

Top ↑

Description Description

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


Top ↑

Parameters Parameters

$post_id

(int) (Required) The ID of the post to save as a revision.


Top ↑

Return Return

(int|WP_Error|void) Void or 0 if error, new revision ID, if success.


Top ↑

Source Source

File: wp-includes/revision.php


			

Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.