You are here

function high_contrast_switch in High contrast 6

Same name and namespace in other branches
  1. 7 high_contrast.module \high_contrast_switch()

Enables/Disables high contrast styles and redirects the user to a destination url

2 calls to high_contrast_switch()
high_contrast_disable_callback in ./high_contrast.module
Menu callback to disable the high contrast styles
high_contrast_enable_callback in ./high_contrast.module
Menu callback to enable the high contrast styles

File

./high_contrast.module, line 157

Code

function high_contrast_switch($enable, $destination = "") {
  $_SESSION["high_contrast_activated"] = $enable ? 1 : 0;
  if (empty($destination)) {
    $destination = _high_contrast_get_current_url();
  }
  drupal_goto($destination);
}