element_info
- Versions
- 7
element_info($type)
Retrieve the default properties for the defined element type.
Code
includes/common.inc, line 5275
<?php
function element_info($type) {
$cache = &drupal_static(__FUNCTION__);
if (!isset($cache)) {
$cache = module_invoke_all('element_info');
foreach ($cache as $element_type => $info) {
$cache[$element_type]['#type'] = $element_type;
}
// Allow modules to alter the element type defaults.
drupal_alter('element_info', $cache);
}
return isset($cache[$type]) ? $cache[$type] : array();
}
?>Login or register to post comments 