5 module.inc | module_hook($module, $hook) |
6 module.inc | module_hook($module, $hook) |
7 module.inc | module_hook($module, $hook) |
8 module.inc | module_hook($module, $hook) |
Determine whether a module implements a hook.
Parameters
$module: The name of the module (without the .module extension).
$hook: The name of the hook (e.g. "help" or "menu").
Return value
TRUE if the module is both installed and enabled, and the hook is implemented in that module.
Related topics
17 calls to module_hook()
File
- includes/
module.inc, line 135 - API for loading and interacting with Drupal modules.
Code
function module_hook($module, $hook) {
return function_exists($module . '_' . $hook);
}
Login or register to post comments