For the complete documentation index, see llms.txt. This page is also available as Markdown.

register_acpt_option_page

Register a new option page

Register a new option page.

Usage

register_acpt_option_page([
    'menu_slug'   => 'new-page',
    'page_title'  => 'New page',
    'menu_title'  => 'New page menu title',
    'icon'        => 'admin-appearance',
    'capability'  => 'manage_options',
    'description' => 'lorem ipsum',
    'position'    => 77,
]);

Parameters

Parameter
Type
Required
Description

menu_slug

string

Required

The page slug (used in the URL and as the menu identifier)

page_title

string

Required

The HTML page title

menu_title

string

Required

The label shown in the admin menu

position

integer

Required

Position of the page in the admin menu

icon

string

Optional

Dashicon or URL for the menu icon — only used for top-level pages

capability

string

Optional

WordPress capability required to access this page (e.g. manage_options)

description

string

Optional

A short description shown on the page

parent

string

Optional

Menu slug of the parent page — makes this a sub-page

permissions

array

Optional

Role-based capability overrides for this option page

Return

Type
Description

bool

true on success, false on failure

Last updated