Core Function
View Source on Trac ↗ add_pages_page()
add_pages_page(
mixed $page_title,
mixed $menu_title,
mixed $capability,
mixed $menu_slug,
mixed $callback = '',
mixed $position = null
) Adds a submenu page to the Pages main menu.
Parameters 4 required
| Name / Type | Description |
|---|---|
| $page_title string | The text to be displayed in the title tags of the page when the menu is selected. Required |
| $menu_title string | The text to be used for the menu. Required |
| $capability string | The capability required for this menu to be displayed to the user. Required |
| $menu_slug string | The slug name to refer to this menu by (should be unique for this menu). Required |
| $callback callable | Optional. The function to be called to output the content for this page. |
| $position int | Optional. The position in the menu order this item should appear. |
Return Value
((string)
| false) The resulting page's hook_suffix, or false if the user does not have the capability required.
Function Information
Since Version
2.7.0
Source File
wp-admin/includes/plugin.php
Advertisement