apply_filters( ‘wp_save_post_revision_post_has_changed’, bool $post_has_changed, WP_Post $latest_revision, WP_Post $post )

Filters whether a post has changed.

Description

By default a revision is saved only if one of the revisioned fields has changed.
This filter allows for additional checks to determine if there were changes.

Parameters

$post_has_changedbool
Whether the post has changed.
$latest_revisionWP_Post
The latest revision post object.
$postWP_Post
The post object.

Source

$post_has_changed = (bool) apply_filters( 'wp_save_post_revision_post_has_changed', $post_has_changed, $latest_revision, $post );

Changelog

VersionDescription
4.1.0Introduced.

User Contributed Notes

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