function theme_high_contrast_switcher_links in High contrast 7
Same name and namespace in other branches
- 6 high_contrast.module \theme_high_contrast_switcher_links()
Get HTML for switcher links().
1 theme call to theme_high_contrast_switcher_links()
- theme_high_contrast_switcher in ./
high_contrast.module - Theme function for high contrast switcher.
File
- ./
high_contrast.module, line 343 - High Contrast main module file.
Code
function theme_high_contrast_switcher_links($vars) {
$label = t(_high_contrast_variable_get('high_contrast_switcher_label'));
$link_high = l(t(_high_contrast_variable_get('high_contrast_high_label')), 'javascript:drupalHighContrast.enableStyles()', [
'fragment' => '',
'external' => TRUE,
]);
$link_normal = l(t(_high_contrast_variable_get('high_contrast_normal_label')), 'javascript:drupalHighContrast.disableStyles()', [
'fragment' => '',
'external' => TRUE,
]);
$separator = _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;
}