function _mobile_switch_check_theme_cookie_use in Mobile Switch 7.2
Helper function to check theme switch usage or theme cookie exists.
Return value
string|boolean The possible string values are standard or mobile. The boolean are allways FALSE.
See also
2 calls to _mobile_switch_check_theme_cookie_use()
- mobile_switch_init in ./
mobile_switch.module - Implements hook_init().
- mobile_switch_page_alter in ./
mobile_switch.module - Implements hook_page_alter().
File
- ./
mobile_switch.module, line 494 - Provides various functionalities to develop mobile ready websites.
Code
function _mobile_switch_check_theme_cookie_use() {
$theme_cookie = FALSE;
$name = 'mobile_switch_mode';
if (isset($_GET['mobile_switch'])) {
$theme_cookie = check_plain($_GET['mobile_switch']);
}
elseif (isset($_COOKIE[$name])) {
$theme_cookie = check_plain($_COOKIE[$name]);
}
return $theme_cookie;
}