acf_revisions::wp_save_post_revision_check_for_changes() public ACF 1.0
This filter will return false and force WP to save a revision. This is required due to WP checking only post_title, post_excerpt and post_content values, not custom fields.
{} Это метод класса: acf_revisions{}
Хуков нет.
Возвращает
$return. (boolean)
Использование
$acf_revisions = new acf_revisions(); $acf_revisions->wp_save_post_revision_check_for_changes( $return, $last_revision, $post );
- (boolean)($return) (обязательный)
- defaults to true
- (object)($last_revision) (обязательный)
- the last revision that WP will compare against
- (object)($post) (обязательный)
- the $post that WP will compare against
Код acf_revisions::wp_save_post_revision_check_for_changes() acf revisions::wp save post revision check for changes ACF 5.9.1
function wp_save_post_revision_check_for_changes( $return, $last_revision, $post ) {
// if acf has changed, return false and prevent WP from performing 'compare' logic
if( acf_maybe_get_POST('_acf_changed') ) return false;
// return
return $return;
}