1 taxonomy.install taxonomy_update_1010()

Clean up extraneous language-related configuration setting.

Related topics

File

core/modules/taxonomy/taxonomy.install, line 409
Install, update and uninstall functions for the taxonomy module.

Code

function taxonomy_update_1010() {
  $config_names = config_get_names_with_prefix('field.bundle.taxonomy_term.');
  foreach ($config_names as $config_name) {
    $config = config($config_name);
    $extra_fields_display_langcode = $config->get('extra_fields.display.language');
    if (isset($extra_fields_display_langcode)) {
      $config->set('extra_fields.display.langcode', $extra_fields_display_langcode);
      $config->clear('extra_fields.display.language');
    }
    $extra_fields_form_langcode = $config->get('extra_fields.form.language');
    if (isset($extra_fields_form_langcode)) {
      $config->set('extra_fields.form.langcode', $extra_fields_form_langcode);
      $config->clear('extra_fields.form.language');
    }
    $config->save();
  }
}