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']); // use only keys for default value $field['default_value'] = array_keys($field['default_value']); // return return $field; }
function update_field($field) { // decode choices (convert to array) $field['choices'] = acf_decode_choices($field['choices']); // return return $field; }
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 return $field; }