Function __global->javascript_enforce
Definitions
sources/web_resources.php
- Force a JavaScript file to be cached (ordinarily we can rely on this to be automated by require_javascript/javascript_tempcode).
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: string
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$j | string | required parameter | N/A | N/A | The JavaScript file required |
$theme | ?ID_TEXT | Null | N/A | N/A | The name of the theme (null: current theme) |
$allow_defer | boolean | False | N/A | N/A | Allow the compilation to be deferred through a PHP call (useful for parallelising compilation) |
Return
- The path to the JavaScript file in the cache (blank: no file) (defer: defer compilation through a script; only possible if $allow_defer is set)
- Type: string
- Set: N/A
- Range: N/A