4.6 module_invoke()
4.7 module_invoke()
5 module_invoke()
6 module_invoke()
7 module_invoke($module, $hook)
8 module_invoke($module, $hook)

Invoke a hook in a particular module.


$module: The name of the module (without the .module extension).

$hook: The name of the hook to invoke.

...: Arguments to pass to the hook implementation.

Return value

The return value of the hook implementation.

Related topics

459 calls to module_invoke()

4 string references to 'module_invoke'


drupal/includes/, line 469
API for loading and interacting with Drupal modules.


function module_invoke() {
  $args = func_get_args();
  $module = $args[0];
  $hook = $args[1];
  unset($args[0], $args[1]);
  $function = $module . '_' . $hook;
  if (module_hook($module, $hook)) {
    return call_user_func_array($function, $args);