javascript($file);
}
/**
* Add the javascript code to the header of the page
*
* See {@link Requirements_Backend::customScript()} for more info
* @param script The script content
* @param uniquenessID Use this to ensure that pieces of code only get added once.
*/
static function customScript($script, $uniquenessID = null) {
self::backend()->customScript($script, $uniquenessID);
}
/**
* Include custom CSS styling to the header of the page.
*
* See {@link Requirements_Backend::customCSS()}
*
* @param string $script CSS selectors as a string (without \n";
}
foreach(array_diff_key($this->customHeadTags,$this->blocked) as $customHeadTag) {
$requirements .= "$customHeadTag\n";
}
if($this->write_js_to_body) {
// Remove all newlines from code to preserve layout
$jsRequirements = preg_replace('/>\n*/', '>', $jsRequirements);
// We put script tags into the body, for performance.
// If your template already has script tags in the body, then we put our script
// tags just before those. Otherwise, we put it at the bottom.
$p1 = strripos($content, '