function mobile_theme_detect_subdomain in Mobile Theme 7
Same name and namespace in other branches
- 6 mobile_theme.module \mobile_theme_detect_subdomain()
Detect whether the user is on a mobile device by checking the subdomain.
File
- ./
mobile_theme.module, line 155
Code
function mobile_theme_detect_subdomain() {
$m = variable_get('mobile_theme_subdomain', 'm.');
return substr($_SERVER['HTTP_HOST'], 0, strlen($m)) === $m;
}