phptemplate_body_class
themes/garland/template.php, строка 8
- Версии
- 5
phptemplate_body_class(
$sidebar_left,$sidebar_right)- 6
phptemplate_body_class($left, $right)
Sets the body-tag class attribute.
Adds 'sidebar-left'
, 'sidebar-right'
or 'sidebars'
classes as needed.
Код
<?php
function phptemplate_body_class($left, $right) {
if ($left != '' && $right != '') {
$class = 'sidebars';
}
else {
if ($left != '') {
$class = 'sidebar-left';
}
if ($right != '') {
$class = 'sidebar-right';
}
}
if (isset($class)) {
print ' class="'. $class .'"';
}
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии