diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-01 02:00:25 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-04-01 02:00:25 +0000 |
commit | 449e23627daad8ce032411d899bd8f71db824d21 (patch) | |
tree | 9e517f755d6a57770f5b1ce7efeef0777cc39996 /engine | |
parent | da93cc376e453bf656d9546df78d2f00f185bb2d (diff) | |
download | elgg-449e23627daad8ce032411d899bd8f71db824d21.tar.gz elgg-449e23627daad8ce032411d899bd8f71db824d21.tar.bz2 |
Fixes #3287 added documentation on non-link menu items
git-svn-id: http://code.elgg.org/elgg/trunk@8893 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggMenuItem.php | 4 | ||||
-rw-r--r-- | engine/lib/navigation.php | 2 |
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 |