Archived
1
0

Minify CSS and JS

This commit is contained in:
KingOfDog 2018-11-01 11:19:02 +01:00 committed by Marcel
parent c07b714a0d
commit f168cf6863

View File

@ -96,6 +96,9 @@ if (isset($_SERVER['HTTP_IF_NONE_MATCH']) &&
while (list(, $element) = each($elements)) {
$path = realpath($base . '/' . $element);
$contents .= "\n\n" . file_get_contents($path);
$contents = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $contents);
$contents = str_replace(': ', ':', $contents);
$contents = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $contents);
// $contents = fn_minify_css($contents);
}