wp_nav_menu_disabled_check()WP 3.6.0

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

No Hooks.


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


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


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


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

wp_nav_menu_disabled_check() code WP 6.5.4

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

	if ( $one_theme_location_no_menus ) {
		return false;

	return disabled( $nav_menu_selected_id, 0, $display );