Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



wp_nav_menu_disabled_check ›

Seit3.6.0
Veraltetn/v
wp_nav_menu_disabled_check ( $nav_menu_selected_id, $echo = true )
Parameter: (2)
  • (int|string) $nav_menu_selected_id ID, name, or slug of the currently selected menu.
    Erforderlich: Ja
  • (bool) $echo Whether to echo or just return the string.
    Erforderlich: Nein
    Standard: true
Gibt zurück:
  • (string|bool) Disabled attribute if at least one menu exists, false if not.
Definiert in:
Codex:
Changelog:
  • 5.3.1

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



Quellcode

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 );
}