get_nav_menu_locations() – Retrieves all registered navigation menu locations and the menus assigned to them.

You appear to be a bot. Output may be restricted

Description

Retrieves all registered navigation menu locations and the menus assigned to them.

Usage

$int[] = get_nav_menu_locations();

Parameters

Returns

int[] Associative array of registered navigation menu IDs keyed by their location name. If none are registered, an empty array.

Source

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

1 to 4 of 4
function get_nav_menu_locations() {
  $locations = get_theme_mod( 'nav_menu_locations' );
  return ( is_array( $locations ) ) ? $locations : array();
}
 

 View on GitHub View on Trac