wp_save_post_revision_post_has_changed

Advertisement

Summery Summery

Filters whether a post has changed.

Syntax Syntax

apply_filters( 'wp_save_post_revision_post_has_changed', bool $post_has_changed, WP_Post $last_revision, WP_Post $post )

Description 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 Parameters

$post_has_changed

(bool) Whether the post has changed.

$last_revision

(WP_Post) The last revision post object.

$post

(WP_Post) The post object.

Source Source

File: wp-includes/revision.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.