acf_revisions::wp_save_post_revision_check_for_changespublicACF 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{}

Хуков нет.

Возвращает

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 $post object that WP will compare against.

Код 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;
}