* @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 {
*/
public function getContent(array $vars = array()) {
- if ($this->href === false) {
+ if ($this->href === false || $this->href === null) {
return $this->text;
}
* @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