function hook_toolbar_alter

Alter the Toolbar menu after hook_toolbar() is invoked.

This hook is invoked by toolbar_view() immediately after hook_toolbar(). The toolbar definitions are passed in by reference. Each element of the $items array is one item returned by a module from hook_toolbar(). Additional items may be added, or existing items altered.

Parameters

$items: Associative array of Toolbar menu definitions returned from hook_toolbar().

Related topics

1 invocation of hook_toolbar_alter()
toolbar_view in drupal/core/modules/toolbar/toolbar.module
Builds the Toolbar as a structured array ready for drupal_render().

File

drupal/core/modules/toolbar/toolbar.api.php, line 99
Hooks provided by the Toolbar module.

Code

function hook_toolbar_alter(&$items) {

  // Move the User tab to the right.
  $items['commerce']['weight'] = 5;
}