Merge branch 'MDL-56959-master' of git://github.com/FMCorz/moodle
authorDan Poltawski <dan@moodle.com>
Thu, 17 Nov 2016 18:01:58 +0000 (18:01 +0000)
committerDan Poltawski <dan@moodle.com>
Thu, 17 Nov 2016 18:01:58 +0000 (18:01 +0000)
1  2 
lib/outputlib.php

@@@ -1513,16 -1562,9 +1562,16 @@@ class theme_config 
              }
          }
  
 +        // Now resolve all theme settings or do any other postprocessing.
 +        // This needs to be done before calling core parser, since the parser strips [[settings]] tags.
 +        $csspostprocess = $this->csspostprocess;
 +        if (function_exists($csspostprocess)) {
 +            $css = $csspostprocess($css, $this);
 +        }
 +
          // Post processing using an object representation of CSS.
-         $hastreeprocessor = !empty($this->csstreepostprocessor) && function_exists($this->csstreepostprocessor);
-         $needsparsing = $hastreeprocessor || !empty($this->rtlmode);
+         $treeprocessor = $this->get_css_tree_post_processor();
+         $needsparsing = !empty($treeprocessor) || !empty($this->rtlmode);
          if ($needsparsing) {
              $parser = new core_cssparser($css);
              $csstree = $parser->parse();