Skip to content
Snippets Groups Projects
Commit 5834cd45 authored by Angie Byron's avatar Angie Byron
Browse files

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

parent 4a8df419
No related branches found
No related tags found
No related merge requests found
......@@ -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');
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment