Check whether to disable the Menu Locations meta box submit button and inputs.
Parameters
$nav_menu_selected_id
int|stringrequired- ID, name, or slug of the currently selected menu.
$display
booloptional- Whether to display or just return the string.
Default:
true
Source
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 );
}
User Contributed Notes
You must log in before being able to contribute a note or feedback.