wp_save_post_revision_post_has_changed WordPress Filter Hook

The wp_save_post_revision_post_has_changed Wordpress hook is called whenever a revision is saved for a post. This hook allows you to perform any actions you need to before the revision is saved.

apply_filters( 'wp_save_post_revision_post_has_changed', bool $post_has_changed, WP_Post $last_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.


Top ↑

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.


Top ↑

Source

File: wp-includes/revision.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.