wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_nav_menu_locations › WordPress Function

Depuis3.0.0
Dépréciéen/a
get_nav_menu_locations ( Pas de paramètres )
Retourne:
  • (int[]) Associative array of registered navigation menu IDs keyed by their location name. If none are registered, an empty array.
Défini(e) dans:
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();
}