MDL-56911 themes: Resolve settings before calling parser

This commit is contained in:
Ankit Agarwal 2016-11-15 13:34:52 +05:30
parent 0b8e0c374f
commit dc48cc0a79

View File

@ -1513,6 +1513,13 @@ 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);
@ -1534,12 +1541,6 @@ class theme_config {
unset($csstree);
}
// now resolve all theme settings or do any other postprocessing
$csspostprocess = $this->csspostprocess;
if (function_exists($csspostprocess)) {
$css = $csspostprocess($css, $this);
}
return $css;
}