You are here

function theme_high_contrast_switcher_links in High contrast 6

Same name and namespace in other branches
  1. 7 high_contrast.module \theme_high_contrast_switcher_links()
1 theme call to theme_high_contrast_switcher_links()
theme_high_contrast_switcher in ./high_contrast.module

File

./high_contrast.module, line 211

Code

function theme_high_contrast_switcher_links($vars) {
  $label = t(_high_contrast_variable_get("high_contrast_switcher_label"));
  $current_url = _high_contrast_get_current_url();
  if ($_SESSION["high_contrast_activated"] == 1) {
    $link_high = t(_high_contrast_variable_get("high_contrast_high_label"));
    $link_normal = l(t(_high_contrast_variable_get("high_contrast_normal_label")), 'high_contrast_disable', array(
      'query' => 'destination=' . $current_url,
    ));
  }
  else {
    $link_high = l(t(_high_contrast_variable_get("high_contrast_high_label")), 'high_contrast_enable', array(
      'query' => 'destination=' . $current_url,
    ));
    $link_normal = t(_high_contrast_variable_get("high_contrast_normal_label"));
  }
  $separator = t(_high_contrast_variable_get("high_contrast_separator"));

  //output
  $code = '
  <div class="high_contrast_switcher high_contrast_switcher_links">
    <p><span class="high_contrast_switcher_label">' . $label . '</span><span class="high_contrast_switcher_high">' . $link_high . '</span><span class="high_contrast_switcher_separator">' . $separator . '</span><span class="high_contrast_switcher_normal">' . $link_normal . '</span></p>
  </div>
  ';
  return $code;
}