function i18n_taxonomy_update_7002 in Internationalization 7
Switch back to real taxonomy fields and override option_list_callback.
File
- i18n_taxonomy/
i18n_taxonomy.install, line 105 - Installation file for i18n_taxonomy module.
Code
function i18n_taxonomy_update_7002(&$sandbox) {
foreach (field_info_fields() as $fieldname => $field) {
if ($field['type'] == 'taxonomy_term_reference') {
$field['module'] = 'taxonomy';
$field['settings']['options_list_callback'] = module_exists('i18n_taxonomy') ? 'i18n_taxonomy_allowed_values' : NULL;
drupal_write_record('field_config', $field, array(
'id',
));
}
}
}