All scripts will be included in the page’s head. This needs to be called either before head(), or in a plugin_header hook.
- $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.
- $version (mixed) – Version number. By default OMEKA_VERSION.
head_js actually outputs the scripts. All themes should already call
so you can just use the queue functions.
$options array is passed as the
$attrs parameter to the
Zend Framework headScript
helper. This can be used to set some attributes on the
<script> tag as
well as to enable some specific functionality of the ZF helper like IE
<?php queue_js_file('my_js_file'); ?>
<?php queue_js_file(array('my_js_file', 'another_js_file')); ?>