function mobile_theme_detect_mobiledevicedetect in Mobile Theme 6
Same name and namespace in other branches
- 7 mobile_theme.module \mobile_theme_detect_mobiledevicedetect()
Detect whether the user is on a mobile device by using Mobile Device Detect.
File
- ./
mobile_theme.module, line 116
Code
function mobile_theme_detect_mobiledevicedetect() {
// Include mobile_device_detect.php so that we can use it.
if (module_load_include('php', 'mobile_theme', 'mobile_device_detect') != FALSE) {
return mobile_device_detect();
}
else {
// Display a warning if the detection method was not found.
drupal_set_message(t('<em>Mobile Device Detect</em> is not installed. Visit the <a href="@adminhelpmobiletheme">documentation on Mobile Theme</a> for more installation instructions.', array(
'@adminhelpmobiletheme' => url('admin/help/mobile_theme'),
)), 'warning');
return FALSE;
}
}