You are here

function themekey_browscap_themekey_properties in ThemeKey 7.3

Implements hook_themekey_properties().

Provides additional properties for module ThemeKey:

  • browscap:comment
  • browscap:browser
  • browscap:version
  • browscap:majorver
  • browscap:minorver
  • browscap:platform
  • browscap:platform_version
  • browscap:ismobiledevice
  • browscap:istablet
  • browscap:issyndicationreader
  • browscap:crawler
  • browscap:cssversion
  • browscap:parent
  • browscap:useragent
  • browscap:browser_name_pattern

Return value

array of themekey properties and mapping functions

File

modules/themekey.browscap.inc, line 35
Provides some browsecap attributes as ThemeKey properties.

Code

function themekey_browscap_themekey_properties() {

  // Attributes for properties
  $attributes = array();
  $attributes['browscap:comment'] = array(
    'description' => t("Browscap: Comment"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:browser'] = array(
    'description' => t("Browscap: Browser"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:version'] = array(
    'description' => t("Browscap: Version"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:majorver'] = array(
    'description' => t("Browscap: Major Version"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:minorver'] = array(
    'description' => t("Browscap: Minor Version"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:platform'] = array(
    'description' => t("Browscap: Platform"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:platform_version'] = array(
    'description' => t("Browscap: Platform Version"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:ismobiledevice'] = array(
    'description' => t("Browscap: Is mobile device"),
    'validator' => 'themekey_validator_string_boolean',
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:istablet'] = array(
    'description' => t("Browscap: Is tablet"),
    'validator' => 'themekey_validator_string_boolean',
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:issyndicationreader'] = array(
    'description' => t("Browscap: Is syndication reader"),
    'validator' => 'themekey_validator_string_boolean',
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:crawler'] = array(
    'description' => t("Browscap: Crawler"),
    'validator' => 'themekey_validator_string_boolean',
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:cssversion'] = array(
    'description' => t("Browscap: CSS Version"),
    'validator' => 'themekey_validator_ctype_digit',
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:parent'] = array(
    'description' => t("Browscap: Parent"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:useragent'] = array(
    'description' => t("Browscap: User Agent"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  $attributes['browscap:browser_name_pattern'] = array(
    'description' => t("Browscap: Browser Name Pattern"),
    'page cache' => THEMEKEY_PAGECACHE_UNSUPPORTED,
  );
  return array(
    'attributes' => $attributes,
  );
}