register_nav_menus

Definition:
function register_nav_menus( $locations = array() {}

Register navigation menus for a theme.

Parameters

  • array $locations: Associative array of menu location identifiers (like a slug) and descriptive text.

Source code

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 );

}

2669

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: