diff --git a/lib/Compiler.class.php b/lib/Compiler.class.php index 004a5dd..e787336 100644 --- a/lib/Compiler.class.php +++ b/lib/Compiler.class.php @@ -1,5 +1,4 @@ $args) - { - $this->registerFunction($name, $args['callback']); - } - } + /** + * Registers a set of functions + * + * @param array $functions + */ + public function registerFunctions(array $functions = array()) + { + foreach ($functions as $name => $args) + { + $this->registerFunction($name, $args['callback']); + } + } /** * Returns available variables @@ -96,7 +95,7 @@ public function cacheStylesheet(WPLessStylesheet $stylesheet, $force = false) // saving compiled stuff if (isset($compiled_cache['compiled']) && $compiled_cache['compiled']) { - $stylesheet->setSourceTimestamp($compiled_cache['updated']); + $stylesheet->setSourceTimestamp($compiled_cache['updated']); $this->saveStylesheet($stylesheet, $compiled_cache['compiled']); $compiled_cache['compiled'] = NULL;