wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_create_nav_menu › WordPress Function

Since3.0.0
Deprecatedn/a
wp_create_nav_menu ( $menu_name )
Parameters:
  • (string) $menu_name Menu name.
    Required: Yes
Returns:
  • (int|WP_Error) Menu ID on success, WP_Error object on failure.
Defined at:
Codex:

Creates a navigation menu.

Note that $menu_name is expected to be pre-slashed.


Source

function wp_create_nav_menu( $menu_name ) {
	// expected_slashed ($menu_name)
	return wp_update_nav_menu_object( 0, array( 'menu-name' => $menu_name ) );
}