• PHP reference
  • Interface

Navigation

class Navigation

Navigation menu renderer.

Properties

boolean $translate

Whether to translate the titles of the menu items by passing them to l(). Defaults to true.

string $base_path

The base path that should be appended to all links in the menu. Defaults to an empty string.

string $active_class

Class to add to active menu items. Defaults to current.

Methods

clear()

Clear navigation menu items.

add_link(string $url, string $title, boolean $current = null, array $classes = [], string $tooltip = '', boolean $translate = null)

Add item to navigation menu.

Parameters

  • string $url
  • string $title
  • boolean $current
  • array $classes
  • string $tooltip
  • boolean $translate

add_divider(string $title = '', string $class = '')

Add a divider.

Parameters

  • string $title
  • string $class

add_statbar_menu(User $user = null)

Add statbar menu.

Parameters

add_mobile_menu()

Add mobile menu.

string get_code()

Get HTML for menu.

Return Value

  • string