add querystring to css and js which is added via head_add_{css, js}
This commit is contained in:
parent
f53478f142
commit
6941fbb182
@ -535,8 +535,11 @@ function format_css_if_exists($source) {
|
|||||||
else
|
else
|
||||||
$path = theme_include($source[0]);
|
$path = theme_include($source[0]);
|
||||||
|
|
||||||
if($path)
|
if($path) {
|
||||||
return '<link rel="stylesheet" href="' . script_path() . '/' . $path . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
|
$path = script_path() . '/' . $path;
|
||||||
|
$qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION;
|
||||||
|
return '<link rel="stylesheet" href="' . $path . $qstring . '" type="text/css" media="' . $source[1] . '">' . "\r\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -612,8 +615,11 @@ function format_js_if_exists($source) {
|
|||||||
$path = $source;
|
$path = $source;
|
||||||
else
|
else
|
||||||
$path = theme_include($source);
|
$path = theme_include($source);
|
||||||
if($path)
|
if($path) {
|
||||||
return '<script src="' . script_path() . '/' . $path . '" ></script>' . "\r\n" ;
|
$path = script_path() . '/' . $path;
|
||||||
|
$qstring = ((parse_url($path, PHP_URL_QUERY)) ? '&' : '?') . 'v=' . STD_VERSION;
|
||||||
|
return '<script src="' . $path . $qstring . '" ></script>' . "\r\n" ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user