diff options
author | Dries Buytaert <dries@buytaert.net> | 2011-09-21 06:03:26 -0400 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2011-09-21 06:03:26 -0400 |
commit | 7f0feebe0b109f50a8cd0de2761d24c3fc013e10 (patch) | |
tree | 59da604fb5b5d61a448095ccb656f08953550009 /modules | |
parent | 4e678c8e24dd867582d82c459f8849e28673d49e (diff) | |
download | brdo-7f0feebe0b109f50a8cd0de2761d24c3fc013e10.tar.gz brdo-7f0feebe0b109f50a8cd0de2761d24c3fc013e10.tar.bz2 |
- Patch #1008250 by jhodgdon, bxtaylor: clean up hook_init() and hook_boot() doc.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/system/system.api.php | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index 7b07736fe..f01c93f3d 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -672,8 +672,8 @@ function hook_element_info_alter(&$type) { * page logging and specialized cleanup. This hook MUST NOT print anything. * * Only use this hook if your code must run even for cached page views. - * If you have code which must run once on all non cached pages, use - * hook_init instead. Thats the usual case. If you implement this hook + * If you have code which must run once on all non-cached pages, use + * hook_init() instead. That is the usual case. If you implement this hook * and see an error like 'Call to undefined function', it is likely that * you are depending on the presence of a module which has not been loaded yet. * It is not loaded because Drupal is still in bootstrap mode. @@ -1744,32 +1744,36 @@ function hook_forms($form_id, $args) { } /** - * Perform setup tasks. See also, hook_init. + * Perform setup tasks for all page requests. * * This hook is run at the beginning of the page request. It is typically - * used to set up global parameters which are needed later in the request. + * used to set up global parameters that are needed later in the request. * - * Only use this hook if your code must run even for cached page views.This hook - * is called before modules or most include files are loaded into memory. + * Only use this hook if your code must run even for cached page views. This + * hook is called before modules or most include files are loaded into memory. * It happens while Drupal is still in bootstrap mode. + * + * @see hook_init() */ function hook_boot() { - // we need user_access() in the shutdown function. make sure it gets loaded + // We need user_access() in the shutdown function. Make sure it gets loaded. drupal_load('module', 'user'); drupal_register_shutdown_function('devel_shutdown'); } /** - * Perform setup tasks. See also, hook_boot. + * Perform setup tasks for non-cached page requests. * * This hook is run at the beginning of the page request. It is typically - * used to set up global parameters which are needed later in the request. - * when this hook is called, all modules are already loaded in memory. + * used to set up global parameters that are needed later in the request. + * When this hook is called, all modules are already loaded in memory. * * This hook is not run on cached pages. * * To add CSS or JS that should be present on all pages, modules should not * implement this hook, but declare these files in their .info file. + * + * @see hook_boot() */ function hook_init() { // Since this file should only be loaded on the front page, it cannot be |