Index: admin_menu.api.php
===================================================================
RCS file: admin_menu.api.php
diff -N admin_menu.api.php
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ admin_menu.api.php	18 Jul 2009 22:49:18 -0000
@@ -0,0 +1,50 @@
+<?php
+// $Id: admin_menu.inc,v 1.54 2009/07/18 21:41:16 sun Exp $
+
+/**
+ * @file
+ * API documentation for Administration menu.
+ */
+
+/**
+ * Alter content in Administration menu bar before it is rendered.
+ *
+ * @param $content
+ *   A structured array suitable for drupal_render(), at the very least
+ *   containing the keys 'menu' and 'links'.  Most implementations likely want
+ *   to alter or add to 'links'.
+ *
+ * $content['menu'] contains the HTML representation of the 'admin_menu' menu
+ * tree.
+ * @see admin_menu_menu_alter()
+ *
+ * $content['links'] contains additional top-level links in the Administration
+ * menu, such as the icon menu or the logout link. You can add more items here
+ * or play with the #weight attribute to customize them.
+ * @see theme_admin_menu_links()
+ * @see admin_menu_adjust_items()
+ */
+function hook_admin_menu_output_alter(&$content) {
+  // Add new top-level item.
+  $content['links']['myitem'] = array(
+    '#title' => t('My item'),
+    // #attributes are used for list items (LI). Note the special syntax for
+    // the 'class' attribute.
+    '#attributes' => array('class' => array('mymodule-myitem')),
+    '#href' => 'mymodule/path',
+    // #options are passed to l(). Note that you can apply 'attributes' for
+    // links (A) here.
+    '#options' => array(
+      'query' => drupal_get_destination(),
+    ),
+    // #weight controls the order of links in the resulting item list.
+    '#weight' => 50,
+  );
+  // Add link to manually run cron.
+  $content['links']['myitem']['cron'] = array(
+    '#title' => t('Run cron'),
+    '#access' => user_access('administer site configuration'),
+    '#href' => 'admin/reports/status/run-cron',
+  );
+}
+
