function hook_mobile_switch_boot_alter in Mobile Switch 6
Same name and namespace in other branches
- 7.2 mobile_switch.api.php \hook_mobile_switch_boot_alter()
 - 7 mobile_switch.api.php \hook_mobile_switch_boot_alter()
 
Alter various configuration settings and values.
Parameters
$conf: The associative array contains the values to alter.
$get: The associative array contains various parameters to help to alter.
1 invocation of hook_mobile_switch_boot_alter()
- mobile_switch_boot in ./
mobile_switch.module  - Implementation of hook_boot().
 
File
- ./
mobile_switch.api.php, line 17  - Hooks provided by the Mobile Switch module.
 
Code
function hook_mobile_switch_boot_alter(&$conf, $get) {
  $conf['theme_cookie'] = FALSE;
  // Theme switch from URL.
  // Set users cookie.
  if (isset($_GET['mobile_switch'])) {
    _mobile_switch_block_set_cookie($_GET['mobile_switch']);
    $get['theme_cookie'] = $_GET['mobile_switch'];
  }
  // Provide cookie value.
  $conf['theme_cookie'] = $get['theme_cookie'] = _mobile_switch_block_get_cookie();
}