Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
Writing module .info files (7.x) states that :
You can now add Javascript in the module's .info file if it should be added on every page. This allows Javascript to be aggregated in an optimal way, and is the preferred method of adding Javascript that most visitors will need on a typical site visit.
Therefore, I'm proposing to move the js inclusion to the .info file instead of the hook_init().
Comment | File | Size | Author |
---|---|---|---|
#1 | bud-1922332-1-script_info.patch | 590 bytes | Simon Georges |
Comments
Comment #1
Simon Georges CreditAttribution: Simon Georges commentedAnd the patch.
Comment #2
PolThanks Simon, committed.