Uses
Uses | Description |
---|---|
wp-includes/nav-menu.php: wp_update_nav_menu_object() | Save the properties of a menu or create a new menu with those properties. |
Creates a navigation menu.
Note that $menu_name
is expected to be pre-slashed.
(string) (Required) Menu name.
(int|WP_Error) Menu ID on success, WP_Error object on failure.
File: wp-includes/nav-menu.php
function wp_create_nav_menu( $menu_name ) { // expected_slashed ($menu_name) return wp_update_nav_menu_object( 0, array( 'menu-name' => $menu_name ) ); }
Version | Description |
---|---|
3.0.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_create_nav_menu