register_nav_menus( array $locations = array() )

Registers navigation menu locations for a theme.


Description Description


Parameters Parameters

$locations

(array) (Optional) Associative array of menu location identifiers (like a slug) and descriptive text.

Default value: array()


Top ↑

Source Source

File: wp-includes/nav-menu.php

function register_nav_menus( $locations = array() ) {
	global $_wp_registered_nav_menus;

	add_theme_support( 'menus' );

	$_wp_registered_nav_menus = array_merge( (array) $_wp_registered_nav_menus, $locations );
}

Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.