Same name and namespace in other branches
  1. 4.6.x developer/hooks/core.php \hook_footer()
  2. 4.7.x developer/hooks/core.php \hook_footer()
  3. 5.x developer/hooks/core.php \hook_footer()

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

1 function implements hook_footer()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

drupal_page_footer in includes/common.inc
Perform end-of-request tasks.
1 invocation of hook_footer()
theme_closure in includes/theme.inc
Execute hook_footer() which is run at the end of the page right before the close of the body tag.

File

developer/hooks/core.php, line 704
These are the hooks that are invoked by the Drupal core.

Code

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