From 04e4b49f791cd7d40604a88f1dba13f444bcab24 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Tue, 1 Mar 2011 19:17:32 +0000 Subject: Fixes #3023: added support for 'class' argument in elgg_register_menu_item git-svn-id: http://code.elgg.org/elgg/trunk@8536 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/classes/ElggMenuItem.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php index 784b5670f..e0e5d0952 100644 --- a/engine/classes/ElggMenuItem.php +++ b/engine/classes/ElggMenuItem.php @@ -116,6 +116,11 @@ class ElggMenuItem { unset($options['context']); } + if (isset($options['class'])) { + $item->setLinkClass($options['class']); + unset($options['class']); + } + foreach ($options as $key => $value) { $item->$key = $value; } @@ -422,9 +427,9 @@ class ElggMenuItem { } if ($this->linkClass) { - $vars['class'] = $this->linkClass; + $vars['class'] = $this->getLinkClass(); } - + if ($this->title) { $vars['title'] = $this->title; } -- cgit v1.2.3