aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggMenuItem.php
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 19:17:32 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-01 19:17:32 +0000
commit04e4b49f791cd7d40604a88f1dba13f444bcab24 (patch)
treec03e0241da6500b2bdab8eed2afca431df1b871f /engine/classes/ElggMenuItem.php
parent165fa6558c1bfd0a7261bdd51b027b54a46961b6 (diff)
downloadelgg-04e4b49f791cd7d40604a88f1dba13f444bcab24.tar.gz
elgg-04e4b49f791cd7d40604a88f1dba13f444bcab24.tar.bz2
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
Diffstat (limited to 'engine/classes/ElggMenuItem.php')
-rw-r--r--engine/classes/ElggMenuItem.php9
1 files 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;
}