function _mobile_switch_block_set_cookie in Mobile Switch Block 6
Same name and namespace in other branches
- 7.2 mobile_switch_block.module \_mobile_switch_block_set_cookie()
- 7 mobile_switch_block.module \_mobile_switch_block_set_cookie()
Set the cookie value.
Parameters
$value: The string contains one of the possible values:
- standard
- mobile
See also
mobile_switch_block_mobile_switch_boot_alter()
1 call to _mobile_switch_block_set_cookie()
- mobile_switch_block_mobile_switch_boot_alter in ./
mobile_switch_block.module - Implementation of hook_mobile_switch_mobile_boot_alter().
File
- ./
mobile_switch_block.module, line 329 - Extends the Mobile Switch module with an theme switch block.
Code
function _mobile_switch_block_set_cookie($value) {
setcookie('mobile_switch_mode', $value, time() + variable_get('mobile_switch_block_cookie_expire', 31536000), '/');
}