NavMenu final class
Minn\Runtime\NavMenu · public/minn/src/Minn/Runtime/NavMenu.php · 133 lines
wp_nav_menu()'s menu: the one the arguments name, its items marked for the page in view (MenuItemMarks), walked, wrapped in the container.
Constants and properties
| private | static array $usedIds |
Public
| static | menus(mixed $args = array ( )): mixed# | Every menu (wp_get_nav_menus): the nav_menu terms by name, empty ones too, as wp_get_nav_menus leaves them. |
| static | menu(mixed $menu): mixed# | A menu by its term, id, slug or name (wp_get_nav_menu_object), or false, as the filter leaves it. |
| static | items(mixed $menu, mixed $args = array ( )): mixed# | A menu's items (wp_get_nav_menu_items), or false for no menu. |
| static | walk(mixed $items, mixed $depth, mixed $args): mixed# | A menu's items printed through the walker its arguments name, else the default (walk_nav_menu_tree). |
| static | locations(): array# | The menu set for each of the theme's locations (get_nav_menu_locations). @return array<string, mixed> |
| static | build(object $args): string|false|null# | The whole menu for wp_nav_menu(): resolve, fetch, decorate, walk, wrap, filter. Null when there is no menu (the caller's fallback runs); false when the items filtered away to nothing. |
Internals 3
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | menuForArgs(object $args): object|false# | The menu the args name: by menu, by assigned location, else the first menu that has items. |
| private | wrapId(object $menu, object $args): string# | The ul id: the caller's, else menu-{slug}, counted up when the same menu renders twice on a page. |
| private | container(string $nav, object $args, string $slug): string# | The container wrap, when the args ask for one. |
Nothing matches.