/** * Process a single stylesheet * * @author oncletom * @since 1.1 * @version 1.3 * @param string $handle * @param $force boolean If set to true, rebuild all stylesheets, without considering they are updated or not * @return WPLessStylesheet */ public function processStylesheet($handle, $force = false) { $wp_styles = $this->getStyles(); $stylesheet = new WPLessStylesheet($wp_styles->registered[$handle], $this->getConfiguration()->getVariables()); if (is_bool($force) && $force || $stylesheet->hasToCompile()) { $compiler = new WPLessCompiler($stylesheet->getSourcePath()); $compiler->registerFunctions($this->getConfiguration()->getFunctions()); $compiler->saveStylesheet($stylesheet); } $wp_styles->registered[$handle]->src = $stylesheet->getTargetUri(); return $stylesheet; }