Formats an element used to toggle the toolbar drawer's visibility.
$variables: An associative array containing:
An HTML string representing the element for toggling.
function theme_toolbar_toggle($variables) {
if ($variables['collapsed']) {
$toggle_text = t('Show shortcuts');
}
else {
$toggle_text = t('Hide shortcuts');
$variables['attributes']['class'][] = 'toggle-active';
}
return l($toggle_text, 'toolbar/toggle', array(
'query' => drupal_get_destination(),
'attributes' => array(
'title' => $toggle_text,
) + $variables['attributes'],
));
}