You are here

function mobile_tools_get_device in Mobile Tools 5

Same name and namespace in other branches
  1. 6.3 mobile_tools.module \mobile_tools_get_device()
  2. 6 mobile_tools.module \mobile_tools_get_device()
  3. 6.2 mobile_tools.module \mobile_tools_get_device()
  4. 7.2 mobile_tools.module \mobile_tools_get_device()

Helper function retrieving the device

File

./mobile_tools.module, line 818
Mobile Tools provides a range of functionality assisting in creating a mobile drupal site . this functionality contains:

Code

function mobile_tools_get_device() {
  $device = array();
  if ($_SESSION['mobile'] == 1) {
    $device['type'] = 'mobile';
  }
  else {
    $device['type'] = 'desktop';
  }
}