Un motore di ricerca WordPress per sviluppatori e autori di temi



wp_create_nav_menu ›

Da3.0.0
Deprecaton/a
wp_create_nav_menu ( $menu_name )
Parametri:
  • (string) $menu_name Menu name.
    Richiesto:
Ritorna:
  • (int|WP_Error) Menu ID on success, WP_Error object on failure.
Definito a:
Codex:

Creates a navigation menu.

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



Sorgenti

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