queue_js_file

Head-related functions

Summary

queue_js_file(string|array $file, string $dir = javascripts, array $options = Array)

Declare that a JavaScript file or files will be used on the page.

All “used” scripts will be included in the page’s head. This needs to becalled either before head(), or in a plugin_header hook.

Parameters:
  • $file (string|array) – File to use, if an array is passed, each array member will be treated like a file.
  • $dir (string) – Directory to search for the file. Keeping the default is recommended.
  • $options (array) – An array of options.

Usage

Examples

See Also

Project Versions

Table Of Contents

Previous topic

queue_css_url

Next topic

queue_js_string

This Page