#1012138 by tstoeckler: Fixed hook_init() example violates what doc says to do

merge-requests/26/head
Angie Byron 2011-01-03 00:28:46 +00:00
parent 4a8df419ab
commit 5834cd45e6
1 changed files with 5 additions and 1 deletions

View File

@ -1735,7 +1735,11 @@ function hook_boot() {
* implement this hook, but declare these files in their .info file.
*/
function hook_init() {
drupal_add_css(drupal_get_path('module', 'book') . '/book.css');
// Since this file should only be loaded on the front page, it cannot be
// declared in the info file.
if (drupal_is_front_page()) {
drupal_add_css(drupal_get_path('module', 'foo') . '/foo.css');
}
}
/**