From 92561d7f36508b7e0271926e417adf0e2e53916b Mon Sep 17 00:00:00 2001 From: Appleman1234 Date: Sun, 25 Sep 2022 13:22:40 +1000 Subject: Initial attempt a switch to composer and PHP-8.1 compatibility --- inc/lib/minify/Minify/CSS.php | 99 ------------------------------------------- 1 file changed, 99 deletions(-) delete mode 100755 inc/lib/minify/Minify/CSS.php (limited to 'inc/lib/minify/Minify/CSS.php') diff --git a/inc/lib/minify/Minify/CSS.php b/inc/lib/minify/Minify/CSS.php deleted file mode 100755 index 32414551..00000000 --- a/inc/lib/minify/Minify/CSS.php +++ /dev/null @@ -1,99 +0,0 @@ - - * @author http://code.google.com/u/1stvamp/ (Issue 64 patch) - */ -class Minify_CSS { - - /** - * Minify a CSS string - * - * @param string $css - * - * @param array $options available options: - * - * 'preserveComments': (default true) multi-line comments that begin - * with "/*!" will be preserved with newlines before and after to - * enhance readability. - * - * 'removeCharsets': (default true) remove all @charset at-rules - * - * 'prependRelativePath': (default null) if given, this string will be - * prepended to all relative URIs in import/url declarations - * - * 'currentDir': (default null) if given, this is assumed to be the - * directory of the current CSS file. Using this, minify will rewrite - * all relative URIs in import/url declarations to correctly point to - * the desired files. For this to work, the files *must* exist and be - * visible by the PHP process. - * - * 'symlinks': (default = array()) If the CSS file is stored in - * a symlink-ed directory, provide an array of link paths to - * target paths, where the link paths are within the document root. Because - * paths need to be normalized for this to work, use "//" to substitute - * the doc root in the link paths (the array keys). E.g.: - * - * array('//symlink' => '/real/target/path') // unix - * array('//static' => 'D:\\staticStorage') // Windows - * - * - * 'docRoot': (default = $_SERVER['DOCUMENT_ROOT']) - * see Minify_CSS_UriRewriter::rewrite - * - * @return string - */ - public static function minify($css, $options = array()) - { - $options = array_merge(array( - 'compress' => true, - 'removeCharsets' => true, - 'preserveComments' => true, - 'currentDir' => null, - 'docRoot' => $_SERVER['DOCUMENT_ROOT'], - 'prependRelativePath' => null, - 'symlinks' => array(), - ), $options); - - if ($options['removeCharsets']) { - $css = preg_replace('/@charset[^;]+;\\s*/', '', $css); - } - if ($options['compress']) { - if (! $options['preserveComments']) { - $css = Minify_CSS_Compressor::process($css, $options); - } else { - $css = Minify_CommentPreserver::process( - $css - ,array('Minify_CSS_Compressor', 'process') - ,array($options) - ); - } - } - if (! $options['currentDir'] && ! $options['prependRelativePath']) { - return $css; - } - if ($options['currentDir']) { - return Minify_CSS_UriRewriter::rewrite( - $css - ,$options['currentDir'] - ,$options['docRoot'] - ,$options['symlinks'] - ); - } else { - return Minify_CSS_UriRewriter::prepend( - $css - ,$options['prependRelativePath'] - ); - } - } -} -- cgit v1.3