apply_filters( ‘wp_save_post_revision_check_for_changes’, bool $check_for_changes, WP_Post $latest_revision, WP_Post $post )

Filters whether the post has changed since the latest revision.

Description

By default a revision is saved only if one of the revisioned fields has changed.
This filter can override that so a revision is saved even if nothing has changed.

Parameters

$check_for_changesbool
Whether to check for changes before saving a new revision.
Default true.
$latest_revisionWP_Post
The latest revision post object.
$postWP_Post
The post object.

Source

if ( isset( $latest_revision ) && apply_filters( 'wp_save_post_revision_check_for_changes', true, $latest_revision, $post ) ) {

Changelog

VersionDescription
3.6.0Introduced.

User Contributed Notes

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