GC_Customize_Manager::_filter_revision_post_has_changed()
最后更新于:2021-11-27 02:54:17
GC_Customize_Manager::_filter_revision_post_has_changed( bool$post_has_changed, GC_Post$last_revision, GC_Post$post)Filters whether a changeset has changed to create a new revision.
参数
- $post_has_changed
-
(bool) (Required) Whether the post has changed.
- $last_revision
-
(GC_Post) (Required) The last revision post object.
- $post
-
(GC_Post) (Required) The post object.
响应
(bool) Whether a revision should be made.
源文件
文件: gc-includes/class-gc-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;
}