The queue_js_string() helper function is used to add inline scripts that will be printed by display_js.
For scripts added with this function to be displayed, the queue_js() call must come before the display_js() call. This means you can generally call queue_js() in the following places:
- In common/header.php, before the call to display_js().
- In a particular view script, before the call to head().
- For plugin writers, in the public_theme_header or admin_theme_header hooks.
Usage
<?php queue_js_string($script); ?>
Arguments
- string
$script
{{#if - | (optional)}}
- The text of the inline script to include.
- {{#if: | Default:
{{{default}}}
}}
Return Value
None.
Output
None. display_js() is the corresponding helper that outputs the tags; all Omeka pages will normally call display_js().
Version History
- Added in Omeka 1.5.