NavigationFallback final class
Minn\Runtime\NavigationFallback · public/minn/src/Minn/Runtime/NavigationFallback.php · 104 lines
The navigation menu a navigation block falls back to (WP_Navigation_Fallback, and the block_core_navigation_* helpers the reference keeps as deprecated): the newest published navigation menu, else one made from the site's classic menu, else a default listing the pages (probes navigation-fallback, nav-pomo-rest-doubts).
Public
| static | fallback(): mixed# | The navigation menu to fall back to: the newest published one; else, unless wp_navigation_should_create_fallback says not, one made from the classic menu or, without one, the default, then the newest again. |
| static | classicMenu(): mixed# | The classic menu a navigation falls back to: the one in the primary location, else the one slugged primary, else the newest; null without menus. |
| static | classicMenuBlocks(object $menu, ?callable $parse = NULL): string# | A classic menu's items as serialized navigation blocks, parsed by the callable given (else here). |
| static | menuItemBlocks(mixed $items, mixed $byParent, ?callable $parse = NULL): array# | Menu items as navigation blocks: a link each, a submenu for an item with children (its inner blocks serialized as its content), the children parsed by the callable given (else here). @return list<array<string, mixed>> |
| static | newest(): mixed# | The newest published navigation menu, through the query's filters, or null. |
| static | fromClassicMenu(): mixed# | The classic menu made a published navigation menu: the insert's answer, or null without a classic menu or with an empty one. |
| static | createDefault(): mixed# | A published navigation menu titled Navigation, listing the site's pages while the page list block is registered. |
Nothing matches.