WPDev.one
Core Class

WP_Navigation_Fallback

class WP_Navigation_Fallback // Constructor: function Object() { [native code] }

Manages fallback behavior for Navigation menus.

Methods 10 methods

Method / Return Description
update_wp_navigation_post_schema()
array

Updates the wp_navigation custom post type schema, in order to expose

Parameters: $schema: mixed
get_fallback()
(WP_Post

Gets (and/or creates) an appropriate fallback Navigation Menu.

get_most_recently_published_navigation()
(WP_Post

Finds the most recently published `wp_navigation` post type.

create_classic_menu_fallback()
(int

Creates a Navigation Menu post from a Classic Menu.

get_fallback_classic_menu()
(WP_Term

Determines the most appropriate classic navigation menu to use as a fallback.

get_most_recently_created_nav_menu()
WP_Term

Sorts the classic menus and returns the most recently created one.

Parameters: $classic_nav_menus: mixed
get_nav_menu_with_primary_slug()
(WP_Term

Returns the classic menu with the slug `primary` if it exists.

Parameters: $classic_nav_menus: mixed
get_nav_menu_at_primary_location()
(WP_Term

Gets the classic menu assigned to the `primary` navigation menu location

create_default_fallback()
(int

Creates a default Navigation Block Menu fallback.

get_default_fallback_blocks()
string

Gets the rendered markup for the default fallback blocks.

Class Information

Since Version
6.3.0
Source File
wp-includes/class-wp-navigation-fallback.php
Advertisement