Function __global->add_menu_item_simple
Definitions
sources/menus2.php
- Add a menu item, without giving tedious/unnecessary detail.
- 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 |
$parent | ?mixed | required parameter | N/A | N/A | The menu item ID of the parent branch of the menu item (AUTO_LINK) / the URL of the parent-item (SHORT_TEXT) (null: is on root) |
$caption | SHORT_TEXT | required parameter | N/A | N/A | The caption |
$url | SHORT_TEXT | Blank (empty string) | N/A | N/A | The URL (in entry point form) |
$expanded | BINARY | 0 | N/A | N/A | Whether it is an expanded branch |
$check_permissions | BINARY | 0 | N/A | N/A | Whether people who may not view the entry point do not see the link |
$dereference_caption | boolean | True | N/A | N/A | Whether the caption is a content language string ID |
$caption_long | SHORT_TEXT | Blank (empty string) | N/A | N/A | The tooltip (blank: none) |
$new_window | BINARY | 0 | N/A | N/A | Whether the link will open in a new window |
$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 |
$order | ?integer | Null | N/A | N/A | Order to use (null: automatic, after the ones that have it specified) |
Return
- The ID of the newly added menu item
- Type: AUTO_LINK
- Set: N/A
- Range: N/A