hook_footer

developer/hooks/core.php, line 664

Versions
4.6 – 7
hook_footer($main = 0)

Insert closing HTML.

This hook enables modules to insert HTML just before the \</body\> closing tag of web pages. This is useful for adding JavaScript code to the footer and for outputting debug information. It is not possible to add JavaScript to the header at this point, and developers wishing to do so should use hook_init() instead.

Parameters

$main Whether the current page is the front page of the site.

Return value

The HTML to be inserted.

Related topics

Code

<?php
function hook_footer($main = 0) {
  if (variable_get('dev_query', 0)) {
    return '<div style="clear:both;">'. devel_query_table() .'</div>';
  }
}
?>
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.