acf_field_checkbox::update_field()publicACF 3.6

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

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

Хуков нет.

Возвращает

$field. - the modified field

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

$acf_field_checkbox = new acf_field_checkbox();
$acf_field_checkbox->update_field( $field );
$field (обязательный)
-

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

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

Код acf_field_checkbox::update_field() ACF 6.0.4

function update_field( $field ) {

	// Decode choices (convert to array).
	$field['choices']       = acf_decode_choices( $field['choices'] );
	$field['default_value'] = acf_decode_choices( $field['default_value'], true );
	return $field;
}