function spam_invoke_hook in Spam 5
Called by other spam module functions to invoke optional _spam hooks in external modules.
Parameters
$name Name of hook.:
$arg1 Optional argument passed to hook.:
$arg2 Optional argument passed to hook.:
$arg3 Optional argument passed to hook.:
Return value
Array returned from hook.
9 calls to spam_invoke_hook()
- spam_admin_settings in ./
spam.module - Provides configuration interface for module.
- spam_admin_settings_actions in ./
spam.module - spam_admin_settings_advanced in ./
spam.module - spam_admin_settings_filter in ./
spam.module - spam_content_filter in ./
spam.module - Determine whether or not provided text is spam.
File
- ./
spam.module, line 1040
Code
function spam_invoke_hook($name, $arg1 = NULL, $arg2 = NULL, $arg3 = NULL) {
$hook = array();
foreach (module_list() as $module) {
$function = $module . '_spam';
if (function_exists($function)) {
$result = $function($name, $arg1, $arg2, $arg3);
if (is_array($hook)) {
$hook = array_merge($hook, $result);
}
else {
if (isset($result)) {
$hook[] = $result;
}
}
}
}
return $hook;
}