function mobile_theme_init in Mobile Theme 5
Same name and namespace in other branches
- 6 mobile_theme.module \mobile_theme_init()
Check to see if the user is running on a mobile browser.
File
- ./
mobile_theme.module, line 6
Code
function mobile_theme_init() {
$browser = browscap_get_browser();
if (isset($browser['ismobiledevice'])) {
if ($browser['ismobiledevice']) {
$theme = variable_get('mobile_theme_selection', 'default');
if ($theme != 'default') {
global $custom_theme;
$custom_theme = $theme;
}
}
}
}