CLPR_Install::add_item_to_menu( int $post_id, string $menu_id, array $menu_item_data = array() )
Adds the page/post to an existing menu.
Package
Description Description
Parameters Parameters
- $post_id
(int) (Required) The post ID to add.
- $menu_id
(string) (Required) The menu ID to add to.
- $menu_item_data
(array) (Optional) The menu item's data.
Default value: array()
Return Return
(int|WP_Error) Menu ID on success, WP_Error object on failure.
Changelog Changelog
Version | Description |
---|---|
2.0.0 | Introduced. |