function mobile_theme_mobile_theme_detection in Mobile Theme 7
Same name and namespace in other branches
- 6 mobile_theme.module \mobile_theme_mobile_theme_detection()
Implements hook_mobile_theme_detection().
File
- ./
mobile_theme.module, line 72
Code
function mobile_theme_mobile_theme_detection() {
// Provide get_browser by default.
$detection_methods = array(
'mobile_theme_detect_php' => t('PHP'),
'mobile_theme_detect_getbrowser' => t('get_browser'),
'mobile_theme_detect_subdomain' => t('!m Subdomain', array(
'!m' => variable_get('mobile_theme_subdomain', 'm.'),
)),
);
// Support Browscap module if available.
if (module_exists('browscap')) {
$detection_methods['mobile_theme_detect_browscap'] = t('Browscap');
}
// Support for http://detectmobilebrowsers.mobi .
if (file_exists(drupal_get_path('module', 'mobile_theme') . '/mobile_device_detect.php')) {
$detection_methods['mobile_theme_detect_mobiledevicedetect'] = t('Mobile Device Detect');
}
return $detection_methods;
}