WordPress at a glance

register_nav_menu() WP 1.0

Registers a navigation menu location for a theme.

Возвращает

Null. Ничего.

Works based on: register_nav_menus()

No Hooks.

Usage

register_nav_menu( $location, $description );
$location(string) (required)
Menu location identifier, like a slug.
$description(string) (required)
Menu location descriptive text.

Список изменений

С версии 3.0.0 Введена.

Code of register_nav_menu() WP 5.5.1

wp-includes/nav-menu.php
<?php
function register_nav_menu( $location, $description ) {
	register_nav_menus( array( $location => $description ) );
}

Related Functions

From tag: nav menu (nav_menu)

More from category: Other Theme Functions

No comments
    Log In . Register