function extra_body_classes_preprocess_html in Extra body classes 7
Same name and namespace in other branches
- 8 extra_body_classes.module \extra_body_classes_preprocess_html()
Implements hook_preprocess_html().
File
- ./
extra_body_classes.module, line 57 - Main file for the Extra body classes module.
Code
function extra_body_classes_preprocess_html(&$variables) {
if (variable_get('extra_body_classes_timestamp', FALSE)) {
$variables['classes_array'][] = date('Ymd');
}
if (variable_get('extra_body_classes_year', FALSE)) {
$variables['classes_array'][] = date('Y');
}
if (variable_get('extra_body_classes_month', FALSE)) {
$variables['classes_array'][] = lcfirst(date('F'));
}
if (variable_get('extra_body_classes_day', FALSE)) {
$variables['classes_array'][] = lcfirst(date('l'));
}
if (variable_get('extra_body_classes_timezone', FALSE)) {
$variables['classes_array'][] = lcfirst(str_replace('/', '-', date('e')));
}
}