wp_create_nav_menu
wp_create_nav_menu ( $menu_name )
Parameters:- (string) menu_name Menu name.
Returns:- (int|WP_Error) Menu ID on success, WP_Error object on failure.
Defined at: - Introduced in WordPress: 3.0.0
- Deprecated in WordPress: —
Description
Creates a navigation menu.Note that `$menu_name` is expected to be pre-slashed.