summaryrefslogtreecommitdiffstats
path: root/zen
diff options
context:
space:
mode:
authorJohnAlbin2008-09-11 09:53:32 +0000
committerJohnAlbin2008-09-11 09:53:32 +0000
commit393516493e082a64e6c0fc5beee82a472b40615d (patch)
treea8b1cf7a777f89806cc139407d8a2f2d71f64e23 /zen
parent7acc50a027558ba3eb4fadd4a90aa58ea738892f (diff)
Optimized zen_menu_item_link().
Diffstat (limited to 'zen')
-rw-r--r--zen/template-menus.php21
1 files changed, 5 insertions, 16 deletions
diff --git a/zen/template-menus.php b/zen/template-menus.php
index 26a16b3..a021834 100644
--- a/zen/template-menus.php
+++ b/zen/template-menus.php
@@ -2,31 +2,20 @@
// $Id$
/**
- * Generate the HTML representing a given menu item ID.
- *
- * An implementation of theme_menu_item_link()
- *
- * @param $link
- * array The menu item to render.
- * @return
- * string The rendered menu item.
+ * Implements theme_menu_item_link()
*/
function zen_menu_item_link($link) {
- if (empty($link['options'])) {
- $link['options'] = array();
+ if (empty($link['localized_options'])) {
+ $link['localized_options'] = array();
}
// If an item is a LOCAL TASK, render it as a tab
if ($link['type'] & MENU_IS_LOCAL_TASK) {
$link['title'] = '<span class="tab">' . check_plain($link['title']) . '</span>';
- $link['options']['html'] = TRUE;
+ $link['localized_options']['html'] = TRUE;
}
- if (empty($link['type'])) {
- $true = TRUE;
- }
-
- return l($link['title'], $link['href'], $link['options']);
+ return l($link['title'], $link['href'], $link['localized_options']);
}
/**