Drupal : hook_footer in Drupal 7

hook_footer was removed in Drupal 7. Here's the equivalent function and how to implement it :

<?php
/**
* Implements hook_page_alter().
*/
function example_page_alter(&amp;$page) {
  if (
variable_get('dev_query', 0)) {
   
$page['page_bottom']['devel']= array(
     
'#type' => 'markup',
     
'#markup' => '<div style="clear:both;">' . devel_query_table() . '</div>',
    );
  }
}
?>

Comments

Hehe!! nice one mate (as usual)! That helped me a lot!

Use hook_page_build
http://api.drupal.org/api/drupal/modules%21system%21system.api.php/funct...

to add new content the alter hook is to change/remove content

Add new comment