lib/MenuItem.php
public function link() {
		if ( !isset($this->url) || !$this->url ) {
			if ( isset($this->_menu_item_type) && $this->_menu_item_type == 'custom' ) {
				$this->url = $this->_menu_item_url;
			} else if ( isset($this->menu_object) && method_exists($this->menu_object, 'get_link') ) {
					$this->url = $this->menu_object->link();
				}
		}
		return $this->url;
	}
public function link() {
		if ( !isset($this->url) || !$this->url ) {
			if ( isset($this->_menu_item_type) && $this->_menu_item_type == 'custom' ) {
				$this->url = $this->_menu_item_url;
			} else if ( isset($this->menu_object) && method_exists($this->menu_object, 'get_link') ) {
					$this->url = $this->menu_object->link();
				}
		}
		return $this->url;
	}
public function link ( ) { if ( ! isset ( $ this -> url ) || ! $ this -> url ) { if ( isset ( $ this -> _menu_item_type ) && $ this -> _menu_item_type == 'custom' ) { $ this -> url = $ this -> _menu_item_url ; } else if ( isset ( $ this -> menu_object ) && method_exists ( $ this -> menu_object , 'get_link' ) ) { $ this -> url = $ this -> menu_object -> link ( ) ; } } return $ this -> url ; }
Get the full link to a menu item.

@api
@example
```twig
{% for item in menu.items %}
<li><a href="{{ item.link }}">{{ item.title }}</a></li>
{% endfor %}
```
@return string A full URL, like `http://mysite.com/thing/`.
Get the full link to a menu item .