ACF_Field_Group::pre_update_field_grouppublicACF 6.1

Filters the field group data before it is updated in the database.

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

Хуков нет.

Возвращает

Массив.

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

$ACF_Field_Group = new ACF_Field_Group();
$ACF_Field_Group->pre_update_field_group( $field_group );
$field_group(массив) (обязательный)
The field group being updated.

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

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

Код ACF_Field_Group::pre_update_field_group() ACF 6.4.2

public function pre_update_field_group( $field_group ) {
	// Remove empty values and convert to associated array.
	if ( $field_group['location'] ) {
		$field_group['location'] = array_filter( $field_group['location'] );
		$field_group['location'] = array_values( $field_group['location'] );
		$field_group['location'] = array_map( 'array_filter', $field_group['location'] );
		$field_group['location'] = array_map( 'array_values', $field_group['location'] );
	}

	return $field_group;
}