acf_field_flexible_content::update_fieldpublicACF 3.6

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

Method of the class: acf_field_flexible_content{}

No Hooks.

Returns

array. $field The modified field

Usage

$acf_field_flexible_content = new acf_field_flexible_content();
$acf_field_flexible_content->update_field( $field );
$field(array) (required)
The field array holding all the field options.

Changelog

Since 3.6 Introduced.

acf_field_flexible_content::update_field() code ACF 6.8.8

public function update_field( $field ) {

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

	// return
	return $field;
}