Commit 0afbd86d authored by webchick's avatar webchick
Browse files

#984374 by zeta ζ: Remove duplicate code in toolbar module.

parent 437ba36d
......@@ -91,13 +91,12 @@ function toolbar_toggle_page() {
function theme_toolbar_toggle($variables) {
if ($variables['collapsed']) {
$toggle_text = t('Show shortcuts');
return '<a href="' . url('toolbar/toggle', array('query' => drupal_get_destination())) . '" title="' . $toggle_text . '"' . drupal_attributes($variables['attributes']) . '>' . $toggle_text . '</a>';
}
else {
$toggle_text = t('Hide shortcuts');
$variables['attributes']['class'][] = 'toggle-active';
return '<a href="' . url('toolbar/toggle', array('query' => drupal_get_destination())) . '" title="' . $toggle_text . '"' . drupal_attributes($variables['attributes']) . '>' . $toggle_text . '</a>';
}
return '<a href="' . url('toolbar/toggle', array('query' => drupal_get_destination())) . '" title="' . $toggle_text . '"' . drupal_attributes($variables['attributes']) . '>' . $toggle_text . '</a>';
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment