wp_update_nav_menu_object

SummerySummery

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

Syntax

wp_update_nav_menu_object( int $menu_id, array $menu_data = array() )

DescriptionDescription

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

ParametersParameters

$menu_id

(int) (Required) The ID of the menu or "0" to create a new menu.

$menu_data

(array) (Optional) The array of menu data.

Default value: array()

ReturnReturn

(int|WP_Error) Menu ID on success, WP_Error object on failure.

SourceSource

File: wp-includes/nav-menu.php


			

ChangelogChangelog

Changelog
Version Description
3.0.0 Introduced.
Scroll to Top