function js_element_info_alter in JS Callback Handler 7.2
Same name and namespace in other branches
- 8.3 js.module \js_element_info_alter()
Implements hook_element_info_alter().
File
- ./
js.module, line 335 - JavaScript callback handler module.
Code
function js_element_info_alter(&$type) {
foreach ($type as $name => $element) {
if (!isset($type[$name]['#pre_render'])) {
$type[$name]['#pre_render'] = array();
}
array_unshift($type[$name]['#pre_render'], 'js_pre_render_element');
// Allow autocomplete elements to be ran via JS Callback.
if (isset($type[$name]['#process']) && in_array('form_process_autocomplete', $type[$name]['#process'])) {
$type[$name]['#process'][] = 'js_process_autocomplete';
}
}
}