acf_flush_field_group_cache()ACF 5.7.10

acf_flush_field_group_cache

Deletes all caches for this field group.

Хуков нет.

Возвращает

null. Ничего (null).

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

acf_flush_field_group_cache( $field_group );
$field_group(массив) (обязательный)
The field group array.

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

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

Код acf_flush_field_group_cache() ACF 6.0.4

function acf_flush_field_group_cache( $field_group ) {

	// Delete stored data.
	acf_get_store( 'field-groups' )->remove( $field_group['key'] );

	// Flush cached post_id for this field group's key.
	wp_cache_delete( acf_cache_key( "acf_get_field_group_post:key:{$field_group['key']}" ), 'acf' );

	// Flush cached array of post_ids for collection of field groups.
	wp_cache_delete( acf_cache_key( 'acf_get_field_group_posts' ), 'acf' );
}