diff options
Diffstat (limited to 'modules/system/system.api.php')
-rw-r--r-- | modules/system/system.api.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 7aead6c9b..8986270b2 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -116,6 +116,24 @@ function hook_elements() { } /** + * 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. + * + * @param &$type + * All element type defaults as collected by hook_elements(). + * + * @see hook_elements() + */ +function hook_element_info_alter(&$type) { + // Decrease the default size of textfields. + if (isset($type['textfield']['#size'])) { + $type['textfield']['#size'] = 40; + } +} + +/** * Perform cleanup tasks. * * This hook is run at the end of each page request. It is often used for |