You are here

function i18n_taxonomy_disable in Internationalization 7

Implements hook_disable()

1 call to i18n_taxonomy_disable()
i18n_taxonomy_update_7003 in i18n_taxonomy/i18n_taxonomy.install
Unset option_list_callback if i18n_taxonomy is disabled.

File

i18n_taxonomy/i18n_taxonomy.install, line 49
Installation file for i18n_taxonomy module.

Code

function i18n_taxonomy_disable() {
  foreach (field_info_fields() as $fieldname => $field) {
    if ($field['type'] == 'taxonomy_term_reference' && $field['settings']['options_list_callback'] == 'i18n_taxonomy_allowed_values') {
      $field['settings']['options_list_callback'] = NULL;
      field_update_field($field);
    }
  }
}