You are here

function languagefield_field_widget_info_alter in Custom Language field 7

Same name and namespace in other branches
  1. 8 languagefield.module \languagefield_field_widget_info_alter()

Implements hook_field_widget_info_alter().

File

./languagefield.module, line 324
Provides a list of languages from ISO 639 standard. All variables of a $language-object can be found here: http://api.drupal.org/api/drupal/developer--globals.php/global/language

Code

function languagefield_field_widget_info_alter(&$info) {
  if (isset($info['options_buttons'])) {
    $info['options_buttons']['field types'][] = 'language_field';

    //    $info['options_buttons']['#value_callback'][] = '_languagefield_widget_value';
  }
  if (isset($info['options_select'])) {
    $info['options_select']['field types'][] = 'language_field';

    //    $info['options_select']['#value_callback'][] = '_languagefield_widget_value';
  }
  if (isset($info['multiselect'])) {
    $info['multiselect']['field types'][] = 'language_field';

    //    $info['multiselect']['#value_callback'][] = '_languagefield_widget_value';
  }
}