js css 버전상수 추가

This commit is contained in:
chicpro
2016-10-05 09:54:14 +09:00
6 changed files with 26 additions and 13 deletions

View File

@ -2423,6 +2423,8 @@ class html_process {
if(!trim($link[1]))
continue;
$link[1] = preg_replace('#\.css([\'\"]?>)$#i', '.css?ver='.G5_CSS_VER.'$1', $link[1]);
$stylesheet .= PHP_EOL.$link[1];
}
}
@ -2447,6 +2449,8 @@ class html_process {
if(!trim($js[1]))
continue;
$js[1] = preg_replace('#\.js([\'\"]?>)$#i', '.js?ver='.G5_JS_VER.'$1', $js[1]);
$javascript .= $php_eol.$js[1];
$php_eol = PHP_EOL;
}
@ -2464,7 +2468,10 @@ class html_process {
<body>
전에 스킨의 자바스크립트가 위치하도록 하게 한다.
*/
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript\n$1", $buffer);
$nl = '';
if($javascript)
$nl = "\n";
$buffer = preg_replace('#(</head>[^<]*<body[^>]*>)#', "$javascript{$nl}$1", $buffer);
return $buffer;
}