You are here

function mobile_tools_detect_device in Mobile Tools 7.2

Detect the device

@todo rename hook to match proper naming conventions

Return value

$device The $device object. Other modules can implement the hook_is_mobile_device()

1 call to mobile_tools_detect_device()
mobile_tools_get_device in ./mobile_tools.module
Get $device object. Check if the 'device' argument is present or a cookie is set to overwrite the device:

File

./mobile_tools.module, line 691
Functionality to ease the creation of mixed device environments.

Code

function mobile_tools_detect_device() {
  $module = variable_get('mobile_tools_device_detection', 'mobile_tools');

  // Ensure the desired module is loaded
  drupal_load('module', $module);
  return module_invoke($module, 'mobile_tools_detect_device');
}