You are here

function entity_translation_taxonomy_autocomplete_process in Entity Translation 7

Process callback for the ET taxonomy autocomplete widget.

1 string reference to 'entity_translation_taxonomy_autocomplete_process'
entity_translation_field_widget_taxonomy_autocomplete_form_alter in ./entity_translation.taxonomy.inc
Implements hook_field_widget_WIDGET_TYPE_form_alter().

File

./entity_translation.taxonomy.inc, line 273
The taxonomy specific translation functions and hook implementations.

Code

function entity_translation_taxonomy_autocomplete_process($element) {

  // The in-place translation widget makes sense only for untranslatable field,
  // which may have the "(all languages)" label suffix. In this case it would be
  // confusing so we need to revert that.
  $instance = field_info_instance($element['#entity_type'], $element['#field_name'], $element['#bundle']);
  $element['#title'] = check_plain($instance['label']);
  return $element;
}