Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Menu::add_category( array $args )
Adds a top level menu item to the navigation.
Description Description
Parameters Parameters
- $args
-
(Required) Array containing the necessary arguments. $args = array( 'id' => (string) The unique ID of the menu item. Required. 'title' => (string) Title of the menu item. Required. 'url' => (string) URL or callback to be used. Required. 'order' => (int) Menu item order. 'migrate' => (bool) Whether or not to hide the item in the wp admin menu. 'menuId' => (string) The ID of the menu to add the category to. ).
Source Source
File: packages/woocommerce-admin/src/Features/Navigation/Menu.php