acf_field_select::update_field() public ACF 3.6
This filter is appied to the $field before it is saved to the database
{} Это метод класса: acf_field_select{}
Хуков нет.
Возвращает
$field. - the modified field
Использование
$acf_field_select = new acf_field_select(); $acf_field_select->update_field( $field );
-
- ($field) (обязательный)
- the field array holding all the field options
-
- ($post_id) (обязательный)
- the field group ID (post_type = acf)
Список изменений
С версии 3.6 | Введена. |
Код acf_field_select::update_field() acf field select::update field ACF 5.9.1
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);
// Convert back to string for single selects.
if( !$field['multiple'] ) {
$field['default_value'] = acf_unarray( $field['default_value'] );
}
// return
return $field;
}