function mobile_switch_preprocess_html in Mobile Switch 7.2
Same name and namespace in other branches
- 7 mobile_switch.module \mobile_switch_preprocess_html()
Preprocess variables for html.tpl.php.
File
- ./
mobile_switch.module, line 511 - Provides various functionalities to develop mobile ready websites.
Code
function mobile_switch_preprocess_html(&$variables) {
if (stristr($_GET['q'], 'admin')) {
drupal_add_css(drupal_get_path('module', 'mobile_switch') . '/css/mobile_switch.system.admin.css');
}
$op_mode = variable_get('mobile_switch_mobile_theme', 'none');
if ($op_mode === 'none') {
return;
}
// Generate body classes.
if ($html_classes = _mobile_switch_generate_html_classes()) {
foreach ($html_classes as $class_name) {
if ($class_name === 'tablet-usage' && $op_mode === 'detectonly') {
continue;
}
$variables['classes_array'][] = $class_name;
}
}
}