module_hook($module, $hook)
drupal/includes/module.inc, line 321
Determine whether a module implements a hook.
$module The name of the module (without the .module extension).
$hook The name of the hook (e.g. "help" or "menu").
TRUE if the module is both installed and enabled, and the hook is implemented in that module.
| Name | Description |
|---|---|
| Hooks | Allow modules to interact with the Drupal core. |
function module_hook($module, $hook) {
return function_exists($module .'_'. $hook);
}