aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/classes/ElggMenuItem.php4
-rw-r--r--engine/lib/navigation.php2
2 files changed, 4 insertions, 2 deletions
diff --git a/engine/classes/ElggMenuItem.php b/engine/classes/ElggMenuItem.php
index 0538ed64c..3d512a08c 100644
--- a/engine/classes/ElggMenuItem.php
+++ b/engine/classes/ElggMenuItem.php
@@ -5,6 +5,8 @@
* @package Elgg.Core
* @subpackage Navigation
*
+ * To create a menu item that is not a link, pass false for $href.
+ *
* @since 1.8.0
*/
class ElggMenuItem {
@@ -443,7 +445,7 @@ class ElggMenuItem {
*/
public function getContent(array $vars = array()) {
- if ($this->href === false) {
+ if ($this->href === false || $this->href === null) {
return $this->text;
}
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index 91d0704eb..8c8212a12 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -61,7 +61,7 @@
* @param mixed $menu_item A ElggMenuItem object or an array of options in format:
* name => STR Menu item identifier (required)
* text => STR Menu item display text (required)
- * href => STR Menu item URL (required)
+ * href => STR Menu item URL (required) (false for non-links)
* contexts => ARR Page context strings
* section => STR Menu section identifier
* title => STR Menu item tooltip