function _boost_copy_css_files in Boost 6
Extract css filenames from html and copy them & their children.
Parameters
$css_files: array containing all css filenames.
1 call to _boost_copy_css_files()
- boost_cache_css_js_files in ./
boost.module - Cache css and or js files.
File
- ./
boost.module, line 4909 - Provides static file caching for Drupal text output. Pages, Feeds, ect...
Code
function _boost_copy_css_files($css_files) {
//copy files
foreach ($css_files as $css_file) {
// Strip extension from filename
$css_file = _boost_kill_file_extension($css_file);
if (file_exists($css_file . '.css')) {
$src = $css_file . '.css';
$dest = BOOST_PERM_FILE_PATH . '/' . $src . BOOST_PERM_CHAR . BOOST_CSS_EXTENSION;
_boost_copy_file($src, $dest);
}
if (file_exists($css_file . '.css.gz')) {
$src = $css_file . '.css.gz';
$dest = BOOST_PERM_GZIP_FILE_PATH . '/' . $css_file . '.css' . BOOST_PERM_CHAR . BOOST_CSS_EXTENSION . BOOST_GZIP_EXTENSION;
_boost_copy_file($src, $dest);
}
elseif (BOOST_GZIP && file_exists($css_file . '.css')) {
$src = $css_file . '.css';
$dest = BOOST_PERM_GZIP_FILE_PATH . '/' . $src . BOOST_PERM_CHAR . BOOST_CSS_EXTENSION . BOOST_GZIP_EXTENSION;
_boost_gz_copy_file($src, $dest);
}
}
}