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:

Description

Save the properties of a menu or create a new menu with those properties.

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

Related Functions

wp_get_nav_menu_object, wp_update_nav_menu_item, wp_delete_nav_menu, wp_create_nav_menu, wp_save_nav_menu_items

Top Google Results

User discussions

wpseek mobile