theme_toolbar_toggle
function theme_toolbar_toggle
theme_toolbar_toggle($variables)
Formats an element used to toggle the toolbar drawer's visibility.
Parameters
$variables: An associative array containing:
- collapsed: A boolean value representing the toolbar drawer's visibility.
- attributes: An associative array of HTML attributes.
Return value
An HTML string representing the element for toggling.
File
- modules/toolbar/toolbar.module, line 91
- Administration toolbar for quick access to top level administration items.
Code
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'])); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!toolbar!toolbar.module/function/theme_toolbar_toggle/7.x