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

$field. - the modified field

Usage

$acf_field_flexible_content = new acf_field_flexible_content();
$acf_field_flexible_content->update_field( $field );
$field(required)
.

Changelog

Since 3.6 Introduced.

acf_field_flexible_content::update_field() code ACF 6.0.4

function update_field( $field ) {

	// loop
	if ( ! empty( $field['layouts'] ) ) {

		foreach ( $field['layouts'] as &$layout ) {

			unset( $layout['sub_fields'] );

		}
	}

	// return
	return $field;
}