You are here

function themekey_wurfl_themekey_properties in ThemeKey 6.3

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

Implements hook_themekey_properties().

Provides additional properties for module ThemeKey:

  • wurfl:is_mobile

Return value

array of themekey properties and mapping functions

File

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

Code

function themekey_wurfl_themekey_properties() {

  // Attributes for properties
  $attributes = array();
  $attributes['wurfl:is_mobile_browser'] = array(
    'description' => t("wurfl: is_mobile_browser - If WURFL module is installed, 'true' if a visitor is using a mobile browser, otherwise 'false'."),
    'validator' => 'themekey_validator_string_boolean',
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $maps = array();
  $maps[] = array(
    'src' => 'system:dummy',
    'dst' => 'wurfl:is_mobile_browser',
    'callback' => 'themekey_wurfl_dummy2is_mobile_browser',
  );
  return array(
    'attributes' => $attributes,
    'maps' => $maps,
  );
}