wp_nav_menu_disabled_check( int|string $nav_menu_selected_id )

Check whether to disable the Menu Locations meta box submit button

Description Description

Parameters Parameters


(int|string) (Required) (id, name or slug) of the currently-selected menu

Top ↑

Return Return

(string) Disabled attribute if at least one menu exists, false if not

Top ↑

Source Source

File: wp-admin/includes/nav-menu.php

function wp_nav_menu_disabled_check( $nav_menu_selected_id ) {
	global $one_theme_location_no_menus;

	if ( $one_theme_location_no_menus ) {
		return false;

	return disabled( $nav_menu_selected_id, 0 );

Top ↑

Changelog Changelog

Version Description
3.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.