wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_nav_menu_disabled_check › WordPress Function

Da3.6.0
Deprecaton/a
wp_nav_menu_disabled_check ( $nav_menu_selected_id, $display = true )
Parametri: (2)
  • (int|string) $nav_menu_selected_id ID, name, or slug of the currently selected menu.
    Richiesto:
  • (bool) $display Whether to display or just return the string.
    Richiesto: No
    Default: true
Ritorna:
  • (string|false) Disabled attribute if at least one menu exists, false if not.
Definito a:
Codex:
ChangeLog:
  • 5.3.1

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



Sorgenti

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