wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_nav_menu_locations › WordPress Function

Desde3.0.0
Obsoleton/a
get_nav_menu_locations ( Sem parâmetros )
Retorna:
  • (int[]) Associative array of registered navigation menu IDs keyed by their location name. If none are registered, an empty array.
Definido em:
Codex:

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



Fonte

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