WP_Customize_Manager::_filter_revision_post_has_changed( bool $post_has_changed, WP_Post $latest_revision, WP_Post $post ): bool

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

Description

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

Parameters

$post_has_changedboolrequired
Whether the post has changed.
$latest_revisionWP_Postrequired
The latest revision post object.
$postWP_Postrequired
The post object.

Return

bool Whether a revision should be made.

Source

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;
}

Changelog

VersionDescription
4.7.0Introduced.

User Contributed Notes

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