wp_update_nav_menu_object
wp_update_nav_menu_object ( $menu_id = 0, $menu_data = array() )
Parameters:- (int) menu_id The ID of the menu or "0" to create a new menu.
- (array) menu_data The array of menu data.
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
Saves the properties of a menu or create a new menu with those properties.Note that `$menu_data` is expected to be pre-slashed.