You are here

function themekey_wurfl_dummy2is_mobile_browser in ThemeKey 6.3

Same name and namespace in other branches
  1. 6.4 modules/themekey.wurfl.inc \themekey_wurfl_dummy2is_mobile_browser()

ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).

src: system:dummy dst: wurfl:is_mobile_browser

Parameters

$dummy: just a dummy

Return value

string 'true' if client is a mobile browser, otherwise 'false', or NULL if no value could be mapped

1 string reference to 'themekey_wurfl_dummy2is_mobile_browser'
themekey_wurfl_themekey_properties in modules/themekey.wurfl.inc
Implements hook_themekey_properties().

File

modules/themekey.wurfl.inc, line 56
Provides some WURFL functionalities as ThemeKey properties.

Code

function themekey_wurfl_dummy2is_mobile_browser($dummy) {
  $requesting_device = wurfl_get_requestingDevice();
  if (is_object($requesting_device)) {
    return $requesting_device
      ->getCapability('mobile_browser') ? 'true' : 'false';
  }
  return NULL;
}