Lines Matching refs:script
376 $script = "var NS='" . (isset($INFO) ? $INFO['namespace'] : '') . "';";
378 $script .= "var SIG=" . toolbar_signature() . ";";
381 $script .= 'var JSINFO = ' . json_encode($JSINFO, JSON_THROW_ON_ERROR) . ';';
382 $script .= '(function(H){H.className=H.className.replace(/\bno-js\b/,\'js\')})(document.documentElement);';
383 $head['script'][] = ['_data' => $script];
388 $head['script'][] = [
395 $head['script'][] = [
429 if ($nonce && $tag == 'script' && !empty($attr['_data'])) {
430 $attr['nonce'] = $nonce; // add nonce to inline script tags
433 if (isset($attr['_data']) || $tag == 'script') {
444 * Output the given script as inline script tag
448 * The script is NOT automatically escaped!
450 * @param string $script
454 function tpl_inlineScript($script, $return = false)
458 $script = '<script nonce="' . $nonce . '">' . $script . '</script>';
460 $script = '<script>' . $script . '</script>';
463 if ($return) return $script;
464 echo $script;