_acf_clear_rest_stored_post_ids_snapshots() │ ACF 6.8.11

The internal ACF function to discard stored post ID snapshots after each REST request (including each request in a batch), which updates fields without firing acf/save_post.

REST requests made while a submitted save is still running, such as with rest_do_request() an acf/update_value callback, leave the snapshots alone, as that save still needs them.

Внутренняя функция — эта функция рассчитана на использование самим ядром. Не рекомендуется использовать эту функцию в своем коде.

Хуков нет.

Возвращает

mixed.

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

_acf_clear_rest_stored_post_ids_snapshots( $response );
$response(разное) (обязательный)
The REST response, returned unchanged.

Список изменений

С версии 6.8.11 Введена.

Код _acf_clear_rest_stored_post_ids_snapshots() ACF 6.8.11

function _acf_clear_rest_stored_post_ids_snapshots( $response ) {
	if ( _acf_is_checking_submitted_post_ids() ) {
		return $response;
	}

	acf_set_data( 'acf_stored_post_ids_snapshots', array() );

	return $response;
}