function themekey_dummy2user_os in ThemeKey 7.3
Same name and namespace in other branches
- 7 modules/themekey.system.inc \themekey_dummy2user_os()
- 7.2 modules/themekey.system.inc \themekey_dummy2user_os()
ThemeKey mapping function to set a ThemeKey property's value (destination) with the aid of another ThemeKey property (source).
src: system:dummy dst: system:user_os
Parameters
$dummy: string containing current value of ThemeKey property system:dummy
Return value
current user's operating system as string
1 string reference to 'themekey_dummy2user_os'
- themekey_system_themekey_properties in modules/
themekey.system.inc - Implements hook_themekey_properties().
File
- modules/
themekey.system.inc, line 618 - Provides some ThemeKey properties.
Code
function themekey_dummy2user_os($dummy) {
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
return ThemekeyBrowserDetection::getOs($_SERVER['HTTP_USER_AGENT']);
}
return NULL;
}