function hook_element_info_alter

Alter the element type information returned from modules.

A module may implement this hook in order to alter the element type defaults defined by a module.

Parameters

$type: All element type defaults as collected by hook_element_info().

See also

hook_element_info()

Related topics

2 functions implement hook_element_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

language_element_info_alter in drupal/core/modules/language/language.module
Implements hook_element_info_alter().
translation_entity_element_info_alter in drupal/core/modules/translation_entity/translation_entity.module
Implements hook_element_info_alter().
1 invocation of hook_element_info_alter()
element_info in drupal/core/includes/common.inc
Retrieves the default properties for the defined element type.

File

drupal/core/modules/system/system.api.php, line 312
Hooks provided by Drupal core and the System module.

Code

function hook_element_info_alter(&$type) {

  // Decrease the default size of textfields.
  if (isset($type['textfield']['#size'])) {
    $type['textfield']['#size'] = 40;
  }
}