wp_nav_menu_disabled_check() – Check whether to disable the Menu Locations meta box submit button and inputs.

You appear to be a bot. Output may be restricted

Description

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

Usage

$string|false = wp_nav_menu_disabled_check( $nav_menu_selected_id, $display );

Parameters

$nav_menu_selected_id
( int|string ) required – ID, name, or slug of the currently selected menu.
$display
( bool ) optional default: 1 – Whether to display or just return the string.

Returns

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

Source

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


Lines:

1 to 10 of 10
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 );
}
 

 View on GitHub View on Trac