acf_revisions::wp_save_post_revision_check_for_changes
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{}
Хуков нет.
Возвращает
true|false. $return
Использование
$acf_revisions = new acf_revisions(); $acf_revisions->wp_save_post_revision_check_for_changes( $return, $last_revision, $post );
- $return(true|false) (обязательный)
- defaults to true.
- $last_revision(объект) (обязательный)
- the last revision that WP will compare against.
- $post(объект) (обязательный)
- the
$postobject that WP will compare against.
Код acf_revisions::wp_save_post_revision_check_for_changes() acf revisions::wp save post revision check for changes ACF 6.4.2
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;
}