/** * Process CSS URL callback * * @param array $matches Matches * @param string $file File * * @return string */ public function processCSSURLHandler(array $matches, $file, $rootURL) { $url = trim($matches[1]); $first = substr($url, 0, 1); if ('"' == $first || '\'' == $first) { $url = stripslashes(substr($url, 1, -1)); } if (strpos($url, $rootURL) === 0) { $url = str_replace(LC_DS, '/', \Includes\Utils\FileManager::makeRelativePath($file, LC_DIR_ROOT . substr($url, strlen($rootURL)))); } return 'url("' . $url . '")'; }