function commentformsettings_element_info_alter in Node and Comments Form Settings 7.3
Same name and namespace in other branches
- 7.2 commentformsettings/commentformsettings.module \commentformsettings_element_info_alter()
Implements hook_element_info_alter().
File
- commentformsettings/
commentformsettings.module, line 289
Code
function commentformsettings_element_info_alter(&$type) {
// If nodeformsettings is not enabled, use this callback directly.
// If not, the callback is processed from nodeformsettings module.
if (!module_exists('nodeformsettings')) {
if (isset($type['text_format']['#process'])) {
foreach ($type['text_format']['#process'] as &$callback) {
if ($callback === 'filter_process_format') {
$callback = 'commentformsettings_process_format';
}
}
}
}
}