Admin Page

Key

Options

Description

menu_title

false

The text to be used for the menu

page_title

false

The text to be displayed in the title tags of the page when the menu is selected

capability

manage_options

The capability required for this menu to be displayed

menu_slug

page_title

/

menu_title

The slug name to refer to this menu by. Should be unique for this menu page and only include lowercase alphanumeric, dashes, and underscores characters to be compatible with sanitize_key()

icon

none

The URL to the icon to be used for this menu. * base64-encoded SVG using a data URI, which will be colored to match the color scheme. data:image/svg+xml;base64 * Name of a Dashicons helper class to use a font icon e.g.dashicons-chart-pie * Pass none to leave div.wp-menu-image empty so an icon can be added via CSS.

position

null

The position in the menu order this one should appear

render

false

Callable Function to trigger when page loaded to render output.

Additional Arguments

Key

Options

Description

network

false

Set true if this page can be visible in WP Network Admin

Set only if this page should be visible only in WP Network Admin

submenu

false

Pass an array() of menu args to create a submenu under current menu

Pass an string of a menu slug to show current menu under an existing menu

Check submenu section for more details

on_load

false

provided functions will be called when current instance page loads.

uses load-{page_slug} | Docs

assets

false

Pass an array or string of Callback Functions / style or script handles to trigger when page loaded to enqueue assets

hook_priority

10

priority argument to be passed for add_action

help_tab

array()

An array or a callback to render custom help tabs. please check Help Tabs Module

help_sidebar

''

please check Help Tabs Module

footer_text

Proudly Powered By WPOnion

Provide a string or a callback function to change text

footer_right_text

WPOnion Version %s

Provide a string or a callback function to change text

Callbacks

on_load

Sinle Callback
Multiple Callback

assets

Demo

Main Menu
Main Menu & Sub menu

Below code will create a new main admin page.

WP Sub menus

Dashboard

Multiple Main Menus

Page With Help Tabs