acf_field_flexible_content::update_fieldpublicACF 3.6

This filter is appied to the $field before it is saved to the database

Метод класса: acf_field_flexible_content{}

Хуков нет.

Возвращает

Массив. $field The modified field

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

$acf_field_flexible_content = new acf_field_flexible_content();
$acf_field_flexible_content->update_field( $field );
$field(массив) (обязательный)
The field array holding all the field options.

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

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

Код acf_field_flexible_content::update_field() ACF 6.4.2

public function update_field( $field ) {

	// loop
	if ( ! empty( $field['layouts'] ) ) {
		foreach ( $field['layouts'] as &$layout ) {
			unset( $layout['sub_fields'] );
		}
	}

	// return
	return $field;
}