WP_Customize_Manager::_filter_revision_post_has_changed()publicWP 4.7.0

Filters whether a changeset has changed to create a new revision.

Note that this will not be called while a changeset post remains in auto-draft status.

Method of the class: WP_Customize_Manager{}

No Hooks.

Return

true|false. Whether a revision should be made.

Usage

$WP_Customize_Manager = new WP_Customize_Manager();
$WP_Customize_Manager->_filter_revision_post_has_changed( $post_has_changed, $latest_revision, $post );
$post_has_changed(true|false) (required)
Whether the post has changed.
$latest_revision(WP_Post) (required)
The latest revision post object.
$post(WP_Post) (required)
The post object.

Changelog

Since 4.7.0 Introduced.

WP_Customize_Manager::_filter_revision_post_has_changed() code WP 6.5.2

public function _filter_revision_post_has_changed( $post_has_changed, $latest_revision, $post ) {
	unset( $latest_revision );
	if ( 'customize_changeset' === $post->post_type ) {
		$post_has_changed = $this->store_changeset_revision;
	}
	return $post_has_changed;
}