wordpress-menu #56

Merged
chris merged 49 commits from wordpress-menu into develop 2022-03-25 13:12:29 +01:00
1 changed files with 13 additions and 3 deletions
Showing only changes of commit d89708381d - Show all commits

View File

@ -74,10 +74,20 @@ if (count($items[0]) == 0) {
if (!function_exists('render_menu')) { if (!function_exists('render_menu')) {
function render_menu($items, $level_id) { function render_menu($items, $level_id) {
echo '<ul>' . PHP_EOL; if ($level_id == 0) {
echo '<ul id="" class="dropdown menu" data-dropdown-menu="dropdown-menu" role="menubar">'.
PHP_EOL;
} else {
echo '<ul class="dropdown menu vertical submenu is-dropdown-submenu first-sub" data-toggle="" data-submenu="" role="">'.
PHP_EOL;
}
foreach ($items[$level_id] as $menu_item) { foreach ($items[$level_id] as $menu_item) {
echo '<li>' . PHP_EOL; if ($level_id == 0) {
echo '<a href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>' . PHP_EOL; echo '<li id="" class="" role="">'.PHP_EOL;
} else {
echo '<li id="" class="is-submenu-item is-dropdown-submenu-item" role="">'.PHP_EOL;
}
echo '<a role="" href="'.$menu_item['url'].'">'.$menu_item['title'].'</a>'.PHP_EOL;
if (array_key_exists($menu_item['id'], $items)) { if (array_key_exists($menu_item['id'], $items)) {
render_menu($items, $menu_item['id']); // render sub menu render_menu($items, $menu_item['id']); // render sub menu
} }