diff options
author | Cash Costello <cash.costello@gmail.com> | 2013-05-31 17:39:15 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2013-05-31 17:39:15 -0400 |
commit | 8d1e8f8c4cbb3e269d36c9867884eef2490dfc60 (patch) | |
tree | fa97c7e6df6204b418ceb0e1621f0212218318ea /engine/lib/navigation.php | |
parent | f90dce8ad3cc15b008f0ce71ce9e93377be06a5b (diff) | |
download | elgg-8d1e8f8c4cbb3e269d36c9867884eef2490dfc60.tar.gz elgg-8d1e8f8c4cbb3e269d36c9867884eef2490dfc60.tar.bz2 |
Fixes #4912 custom site menu items are now matched
Diffstat (limited to 'engine/lib/navigation.php')
-rw-r--r-- | engine/lib/navigation.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php index 118a7214c..2831d418b 100644 --- a/engine/lib/navigation.php +++ b/engine/lib/navigation.php @@ -323,7 +323,8 @@ function elgg_site_menu_setup($hook, $type, $return, $params) { } if (!$selected) { - // nothing selected, match name to context + // nothing selected, match name to context or match url + $current_url = current_page_url(); foreach ($return as $section_name => $section) { foreach ($section as $key => $item) { // only highlight internal links @@ -332,6 +333,10 @@ function elgg_site_menu_setup($hook, $type, $return, $params) { $return[$section_name][$key]->setSelected(true); break 2; } + if ($item->getHref() == $current_url) { + $return[$section_name][$key]->setSelected(true); + break 2; + } } } } |