The new page will have the title you specify for $page_title, and the menu item for the page will have the title you specify for $menu_title. You need to have the capability specified in $capability in order to see the new page, and the menu item for the page will have the slug you specify in $menu_slug. The $function parameter is a callback function that will run when the new page is loaded. You can also specify an icon to be used for the menu item with $icon_url, and you can specify the position of the new menu item with $position.
Was this code snippet helpful?
YesNo