You are here

static function ThemekeyBrowserDetection::getBrowserSimplified in ThemeKey 7.2

Same name and namespace in other branches
  1. 7.3 modules/themekey_browser_detection.php \ThemekeyBrowserDetection::getBrowserSimplified()
  2. 7 modules/themekey_browser_detection.php \ThemekeyBrowserDetection::getBrowserSimplified()

Get browsername simplified

@static @access public

Parameters

string browser:

Return value

string browser name or 'unknown' if unrecognized

1 call to ThemekeyBrowserDetection::getBrowserSimplified()
themekey_user_browser2user_browser_simplified in modules/themekey.system.inc
ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).

File

modules/themekey_browser_detection.php, line 150
Derived from Browser Detection Class by Dragan Dinic <dragan@dinke.net> and modified to fit the needs of ThemeKey Properties.

Class

ThemekeyBrowserDetection
Browser Detection class contains common static method for getting browser version and OS

Code

static function getBrowserSimplified($browser) {
  return trim(preg_replace('/[0-9.]/', '', $browser));
}