1 system.menu.inc system_menu_block_get_title()

Retrieves the menu item to use for the tree's title.

Return value

array|string: A render array or string containing the tree's title.

File

core/modules/system/system.menu.inc, line 418

Code

function system_menu_block_get_title() {
  $menu_item = system_menu_block_set_title();

  if (is_string($menu_item)) {
    // The tree's title is a menu title, a normal string.
    $title = check_plain($menu_item);
  }
  // The tree's title is a menu item.
  else {
    $title = check_plain($menu_item['title']);
  }
  return $title;
}