Function __global->add_menu_item
Definitions
sources/menus2.php
- Add a menu item.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: int
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$menu_id | SHORT_TEXT | required parameter | N/A | N/A | The name of the menu to add the item to |
$order | integer | required parameter | N/A | N/A | The relative order of this item on the menu |
$parent | ?AUTO_LINK | required parameter | N/A | N/A | The menu item ID of the parent branch of the menu item (null: is on root) |
$caption | SHORT_TEXT | required parameter | N/A | N/A | The caption |
$url | SHORT_TEXT | required parameter | N/A | N/A | The URL (in entry point form) |
$check_permissions | BINARY | required parameter | N/A | N/A | Whether people who may not view the entry point do not see the link |
$page_only | SHORT_TEXT | required parameter | N/A | N/A | Match-keys to identify what pages the item is shown on |
$expanded | BINARY | required parameter | N/A | N/A | Whether it is an expanded branch |
$new_window | BINARY | required parameter | N/A | N/A | Whether the link will open in a new window |
$caption_long | SHORT_TEXT | required parameter | N/A | N/A | The tooltip (blank: none) |
$theme_image_code | ID_TEXT | Blank (empty string) | N/A | N/A | The theme image code |
$include_sitemap | SHORT_INTEGER | 0 | N/A | N/A | An INCLUDE_SITEMAP_* constant |
$id | ?AUTO_LINK | Null | N/A | N/A | The ID (null: auto-increment) |
Return
- The ID of the newly added menu item
- Type: AUTO_LINK
- Set: N/A
- Range: N/A