wpseek.com
A WordPress-centric search engine for devs and theme authors



get_registered_nav_menus › WordPress Function

Since3.0.0
Deprecatedn/a
get_registered_nav_menus ( No parameters )
Returns:
  • (string[]) Associative array of registered navigation menu descriptions keyed by their location. 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();
}