diff options
Diffstat (limited to 'lib/exe/css.php')
-rw-r--r-- | lib/exe/css.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index a9e0efab5..2bd63cbdc 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -77,6 +77,9 @@ function css_out(){ $css = ob_get_contents(); ob_end_clean(); + // apply style replacements + $css = css_applystyle($css); + // compress whitespace and comments if($conf['compress']){ $css = css_compress($css); @@ -101,6 +104,7 @@ function css_cacheok($cache,$files){ // some additional files to check $files[] = DOKU_CONF.'dokuwiki.conf'; $files[] = DOKU_CONF.'local.conf'; + $files[] = DOKU_TPLINC.'style.ini'; $files[] = __FILE__; // now walk the files @@ -113,6 +117,20 @@ function css_cacheok($cache,$files){ } /** + * Does placeholder replacements in the style according to + * the ones defined in a templates style.ini file + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function css_applystyle($css){ + if(@file_exists(DOKU_TPLINC.'style.ini')){ + $ini = parse_ini_file(DOKU_TPLINC.'style.ini'); + $css = strtr($css,$ini); + } + return $css; +} + +/** * Prints classes for interwikilinks * * Interwiki links have two classes: 'interwiki' and 'iw_$name>' where |