Hi,

Why should i use Hook_init as a developer for module development ?

http://api.drupal.org/api/drupal/developer%21hooks%21core.php/function/h...

Can someone give me an example for a use of hook_init in module ?

thanks.

Comments

jaypan’s picture

All of the listings in the link below that say 'Implements hook_init()' in the right column, are examples of how to use hook_init() in a module:

http://api.drupal.org/api/search/7/_init

Edit: Except for the listing for hook_init() of course

Contact me to contract me for D7 -> D10/11 migrations.