The documentation of the function contains the following text, which is the exact same text reported in the documentation for drupal_add_css() (the emphasis is mine):

$options['preprocess'] should be only set to TRUE when a file is required for all typical visitors and most pages of a site. It is critical that all preprocessed files are added unconditionally on every page, even if the files are not needed on a page. This is normally done by calling drupal_add_css() in a hook_init() implementation.

I guess the text contained in drupal_add_js() should reference the drupal_add_js() function.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

danillonunes’s picture

Status: Active » Needs review
FileSize
625 bytes

I think this fixes it.

Status: Needs review » Needs work

The last submitted patch, 1010376-drupal_add_js-phpdoc-fix.patch, failed testing.

danillonunes’s picture

Status: Needs work » Needs review
FileSize
617 bytes

Ops, just forgot the --no-prefix option for Git.

apaderno’s picture

Status: Needs review » Reviewed & tested by the community

The test bot is happy, and I am happy too. :-)

jhodgdon’s picture

thanks, me too.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks! :)

apaderno’s picture

Happy new year!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.