function adminimal_admin_menu_preprocess_html in Adminimal Administration Menu 7.2
Same name and namespace in other branches
- 7 adminimal_admin_menu.module \adminimal_admin_menu_preprocess_html()
Implements hook_preprocess_html().
File
- ./
adminimal_admin_menu.module, line 248 - Themes Administration menu like Adminimal theme.
Code
function adminimal_admin_menu_preprocess_html(&$vars) {
if (!_adminimal_admin_menu_access()) {
return;
}
// Add the "adminimal" class to the body for better css selection.
$vars['classes_array'][] = 'adminimal-menu';
// Add frontend and backend classes to the body.
if (path_is_admin(current_path())) {
$vars['classes_array'][] = 'adminimal-backend';
}
else {
$vars['classes_array'][] = 'adminimal-frontend';
}
// Add the shortcut render mode class.
if (module_exists('shortcut')) {
$vars['classes_array'][] = 'menu-render-' . variable_get('adminimal_admin_menu_render', 'collapsed');
}
_adminimal_admin_menu_viewport();
}