Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_create_nav_menu ›

Desde3.0.0
Obsoleton/a
wp_create_nav_menu ( $menu_name )
Parâmetros:
  • (string) $menu_name Menu name.
    Required: Yes
Retorna:
  • (int|WP_Error) Menu ID on success, WP_Error object on failure.
Definido em:
Codex:

Creates a navigation menu.

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



Fonte

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