A WordPress-centric search engine for devs and theme authors



get_nav_menu_locations ›

Since3.0.0
Deprecatedn/a
get_nav_menu_locations ( No parameters )
Returns:
  • (array) Registered navigation menu locations and the menus assigned them. If none are registered, an empty array.
Defined at:
Codex:

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



Source

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