Same name and namespace in other branches
  1. 4.6.x includes/bootstrap.inc \bootstrap_invoke_all()
  2. 4.7.x includes/bootstrap.inc \bootstrap_invoke_all()
  3. 5.x includes/bootstrap.inc \bootstrap_invoke_all()
  4. 7.x includes/bootstrap.inc \bootstrap_invoke_all()

Call all init or exit hooks without including all modules.

Parameters

$hook: The name of the bootstrap hook we wish to invoke.

File

includes/bootstrap.inc, line 688
Functions that need to be loaded on every Drupal request.

Code

function bootstrap_invoke_all($hook) {
  foreach (module_list(TRUE, TRUE) as $module) {
    drupal_load('module', $module);
    module_invoke($module, $hook);
  }
}