function mobile_theme_custom_theme in Mobile Theme 7
Implements hook_custom_theme().
File
- ./
mobile_theme.module, line 50
Code
function mobile_theme_custom_theme() {
// Retrieve the detection method.
$method = variable_get('mobile_theme_detection', 'mobile_theme_detect_php');
// If the detection method cannot be found, revert to default
if (!function_exists($method)) {
$method = "mobile_theme_detect_php";
}
// Check if the mobile theme is to be used.
$mobile_device = $method();
if ($mobile_device) {
$theme = variable_get('mobile_theme_selection', 'default');
if ($theme != 'default') {
return $theme;
}
}
}