acf_revisions::wp_save_post_revision_check_for_changes()publicACF 1.0

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.

@type    filter

{} Это метод класса: acf_revisions{}

Хуков нет.

Возвращает

$return. (boolean)

Использование

$acf_revisions = new acf_revisions();
$acf_revisions->wp_save_post_revision_check_for_changes( $return, $last_revision, $post );
$return (обязательный)
-
$last_revision (обязательный)
-
$post (обязательный)
-

Код acf_revisions::wp_save_post_revision_check_for_changes() ACF 5.10.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;

}