drupal函数:hook_footer

modules/system/system.api.php, 160行

版本
4.6 – 7
hook_footer($main = 0)

插入闭合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.

参数

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

返回值

The HTML to be inserted.

相关主题

Hooks
Allow modules to interact with the Drupal core.

代码

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


Syndicate content