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_item( array $args )

Adds a child 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. 'parent' => (string) Parent menu item ID. 'capability' => (string) Capability to view this menu item. '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 item to. 'matchExpression' => (string) A regular expression used to identify if the menu item is active. ).


Top ↑

Source Source

File: packages/woocommerce-admin/src/Features/Navigation/Menu.php


			


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.