added tpl_classes() function to keep latest stable working

This commit is contained in:
Anika Henke 2013-08-11 23:20:34 +01:00
parent cac0893bbb
commit e54aa15420

View file

@ -81,3 +81,22 @@ function _tpl_action($type, $link=0, $wrapper=0) {
break;
}
}
/**
* copied from core
* @todo: remove when it's available in stable (autumn 2013)
*/
if (!function_exists('tpl_classes')) {
function tpl_classes() {
global $ACT, $conf, $ID, $INFO;
$classes = array(
'dokuwiki',
'mode_'.$ACT,
'tpl_'.$conf['template'],
$_SERVER['REMOTE_USER'] ? 'loggedIn' : '',
$INFO['exists'] ? '' : 'notFound',
($ID == $conf['start']) ? 'home' : '',
);
return join(' ', $classes);
}
}