function entity_reference_field_widget_info_alter

Implements hook_field_widget_info_alter().

File

drupal/core/modules/entity_reference/entity_reference.module, line 69
Provides a field that can reference other entities.

Code

function entity_reference_field_widget_info_alter(&$info) {
  if (isset($info['options_select'])) {
    $info['options_select']['field_types'][] = 'entity_reference';
  }
  if (isset($info['options_buttons'])) {
    $info['options_buttons']['field_types'][] = 'entity_reference';
  }
}