WordPress at Your Fingertips
function is not described

wp_nav_menu_disabled_check() WP 3.6.0

Check whether to disable the Menu Locations meta box submit button and inputs.

No Hooks.

Return

String|false. Disabled attribute if at least one menu exists, false if not.

Usage

wp_nav_menu_disabled_check( $nav_menu_selected_id, $echo );
$nav_menu_selected_id(int|string) (required)
ID, name, or slug of the currently selected menu.
$echo(true|false)
Whether to echo or just return the string.
Default: true

Notes

  • Global. true|false. $one_theme_location_no_menus to determine if no menus exist

Changelog

Since 3.6.0 Introduced.
Since 5.3.1 The $echo parameter was added.

Code of wp_nav_menu_disabled_check() WP 5.8.2

function wp_nav_menu_disabled_check( $nav_menu_selected_id, $echo = true ) {
	global $one_theme_location_no_menus;

	if ( $one_theme_location_no_menus ) {
		return false;
	}

	return disabled( $nav_menu_selected_id, 0, $echo );
}