You are here

function _mobile_switch_block_get_cookie in Mobile Switch Block 7.2

Same name and namespace in other branches
  1. 6 mobile_switch_block.module \_mobile_switch_block_get_cookie()
  2. 7 mobile_switch_block.module \_mobile_switch_block_get_cookie()

Get the cookie value.

Return value

boolean|string FALSE if not set or one of the two values standard/mobile.

See also

mobile_switch_block_mobile_switch_boot_alter()

1 call to _mobile_switch_block_get_cookie()
mobile_switch_block_mobile_switch_boot_alter in ./mobile_switch_block.module
Implements hook_mobile_switch_mobile_boot_alter().

File

./mobile_switch_block.module, line 408
Extends the Mobile Switch module with an theme switch block.

Code

function _mobile_switch_block_get_cookie() {
  $name = 'mobile_switch_mode';
  return isset($_COOKIE[$name]) ? $_COOKIE[$name] : FALSE;
}