function csscrush_string($string, $options = null) { return csscrush::string($string, $options); }
if ($variables) { parse_str($variables, $in_vars); $process_opts['vars'] = $in_vars; } $process_opts['boilerplate'] = $boilerplate ? true : false; $process_opts['debug'] = $pretty ? true : false; $process_opts['rewrite_import_urls'] = true; $import_context = $input_file ? dirname(realpath($input_file)) : null; // If there is an import context set it to the document root if ($import_context) { $old_doc_root = csscrush::$config->docRoot; csscrush::$config->docRoot = $import_context; $process_opts['import_context'] = $import_context; } // Process the stream $output = csscrush::string($input, $process_opts); // Reset the document root after processing if ($import_context) { csscrush::$config->docRoot = $old_doc_root; } ################################################################## ## Output if ($output_file) { if (!@file_put_contents($output_file, $output)) { fwrite($stdout, "Could not write to path '{$output_file}'\n"); if (strpos($output_file, '~') === 0) { fwrite($stdout, "No tilde expansion\n"); } exit(0); } } else {