diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2011-01-03 00:28:46 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2011-01-03 00:28:46 +0000 |
commit | 5834cd45e6f993fde5af8e928cfefff44c1efa1d (patch) | |
tree | 3c5d1cec1d52bde577f407c5f5b30fb5737f9ff1 | |
parent | 4a8df419ab58fc53a4e29e9b5b8b4cbe4ca56cf5 (diff) | |
download | brdo-5834cd45e6f993fde5af8e928cfefff44c1efa1d.tar.gz brdo-5834cd45e6f993fde5af8e928cfefff44c1efa1d.tar.bz2 |
#1012138 by tstoeckler: Fixed hook_init() example violates what doc says to do
-rw-r--r-- | modules/system/system.api.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/system/system.api.php b/modules/system/system.api.php index aed02ae2c..7917150c8 100644 --- a/modules/system/system.api.php +++ b/modules/system/system.api.php @@ -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'); + } } /** |