Merge pull request #19885 from alsoft10/develop

PR REQUEST #19679
This commit is contained in:
Laurent Destailleur 2022-01-23 12:12:53 +01:00 committed by GitHub
commit 9be8c0b474
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1767,6 +1767,14 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
}
}
//If you want to load custom javascript file from your selected theme directory
if (!empty($conf->global->ALLOW_THEME_JS)) {
$theme_js = dol_buildpath('/theme/'.$conf->theme.'/'.$conf->theme.'.js', 0);
if (file_exists($theme_js)) {
print '<script src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/'.$conf->theme.'.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
}
}
if (!empty($head)) {
print $head."\n";
}