public static function compile_single_field($parent, $scss_path, $filename) { self::$parent = $parent; echo 'single field compile: ' . $scss_path . ' ' . $filename; if (!class_exists('scssc') && !isset($GLOBALS['redux_scss_compiler'])) { $GLOBALS['redux_scss_compiler'] = true; require_once "scssphp/scss.inc.php"; } $scss = new scssc(); $scss->setImportPaths($scss_path); if (!$parent->args['dev_mode']) { $scss->setFormatter("scss_formatter_compressed"); } $new_css = $scss->compile('@import "' . $filename . '.scss"'); unset($scss); self::$parent->filesystem->execute('put_contents', $scss_path . '/' . $filename . '.css', array('content' => $new_css)); }