You are here

function _mobile_detect_simple_debug in Mobile Detect 7

Content generator for hook_block_view('mobile_detect_simple_debug')

1 call to _mobile_detect_simple_debug()
mobile_detect_block_view in ./mobile_detect.module
Implements function hook_block_view().

File

./mobile_detect.module, line 193
Lightweight mobile detection based on the Mobile_Detect.php library.

Code

function _mobile_detect_simple_debug() {
  $true = t('true');
  $false = t('false');
  $output = array();
  $output[] = '<dl>';
  $output[] = '<dt>' . t('isMobile') . '</dt>';
  $output[] = '<dd>' . (mobile_detect_check_type('isMobile') ? $true : $false) . '</dd>';
  $output[] = '<dt>' . t('isTablet') . '</dt>';
  $output[] = '<dd>' . (mobile_detect_check_type('isTablet') ? $true : $false) . '</dd>';
  $output[] = '<dt>' . t('isHandheld') . '</dt>';
  $output[] = '<dd>' . (mobile_detect_check_type('isHandheld') ? $true : $false) . '</dd>';
  $output[] = '<dt>' . t('Request Time') . '</dt>';
  $output[] = '<dd>' . REQUEST_TIME . '</dd>';
  $output[] = '</dl>';
  return join('', $output);
}