acf_field_checkbox::update_field
This filter is appied to the $field before it is saved to the database
Method of the class: acf_field_checkbox{}
No Hooks.
Returns
$field. - the modified field
Usage
$acf_field_checkbox = new acf_field_checkbox(); $acf_field_checkbox->update_field( $field );
- $field(required)
- .
Changelog
| Since 3.6 | Introduced. |
acf_field_checkbox::update_field() acf field checkbox::update field code 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;
}