WP_Customize_Manager::_filter_revision_post_has_changed() WordPress Method

The WP_Customize_Manager::_filter_revision_post_has_changed() is used to check whether a revision post has changed. This is a method of the WP_Customize_Manager class.

WP_Customize_Manager::_filter_revision_post_has_changed( bool $post_has_changed, WP_Post $last_revision, WP_Post $post ) #

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.


Top ↑

Parameters

$post_has_changed

(bool)(Required)Whether the post has changed.

$last_revision

(WP_Post)(Required)The last revision post object.

$post

(WP_Post)(Required)The post object.


Top ↑

Return

(bool) Whether a revision should be made.


Top ↑

Source

File: wp-includes/class-wp-customize-manager.php

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

Top ↑

Changelog

Changelog
VersionDescription
4.7.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.

Show More