1 menu.inc theme_menu_tree($variables)

Returns HTML for a wrapper for a menu tree.

Note that this may be called multiple times for rendering a menu and its children if showing multiple levels of depth.

Parameters

$variables: An associative array containing:

  • attributes: Since 1.5.0. Attributes to be added to this menu tree.
  • depth: Since 1.5.0. The menu level depth. Will be 0 for the first level.
  • tree: An HTML string containing the tree's items.

See also

template_preprocess_menu_tree()

Related topics

File

core/includes/menu.inc, line 1787
API for the Backdrop menu system.

Code

function theme_menu_tree($variables) {
  return '<ul' . backdrop_attributes($variables['attributes']) . '>' . $variables['tree'] . '</ul>';
}