A WordPress-centric search engine for devs and theme authors



get_registered_nav_menus ›

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

Retrieves all registered navigation menu locations in a theme.



Source

function get_registered_nav_menus() {
	global $_wp_registered_nav_menus;
	if ( isset( $_wp_registered_nav_menus ) ) {
		return $_wp_registered_nav_menus;
	}
	return array();
}