Skip to content
Snippets Groups Projects
Commit e4d791fe authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Menu fix by Jonathan.
parent 5963759e
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -134,7 +134,7 @@ function menu_in_active_trail($path) {
/**
* Returns a rendered menu tree.
*/
function menu_tree($parent = "") {
function menu_tree($parent = "", $hidden = 0) {
global $_list;
static $trail;
......@@ -161,9 +161,12 @@ function menu_tree($parent = "") {
}
$output .= "</li>\n";
}
else if ($_list[$item]["hidden"] == 1 && $_list[$item]["children"]) {
$output .= menu_tree($item, 1);
}
}
if ($output != '') {
if ($output != '' && $hidden != 1) {
$output = "\n<ul>\n$output\n</ul>\n";
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment