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

Option pages

acpt/list-option-pages, acpt/get-option-page, acpt/save-option-page, acpt/delete-option-page

Category: acpt-content-model · Default capability: manage_options

Ability
What it does

acpt/list-option-pages

Returns every ACPT option page

acpt/get-option-page

Returns a single option page by menu slug

acpt/save-option-page

Creates an option page, or updates it if the menu slug already exists

acpt/delete-option-page

Deletes an option page

acpt/list-option-pages

No input required.

$result = wp_get_ability('acpt/list-option-pages')->execute();

acpt/get-option-page

Input

Property
Type
Required

menu_slug

string

Yes

$result = wp_get_ability('acpt/get-option-page')->execute([
    'menu_slug' => 'company-settings',
]);
{
  "success": true,
  "message": "Operation completed successfully.",
  "data": {
    "id": "d3e4f5a6-7890-4abc-9def-0123456789ab",
    "parentId": null,
    "pageTitle": "Company Settings",
    "menuTitle": "Company",
    "capability": "manage_options",
    "menuSlug": "company-settings",
    "icon": "admin-generic",
    "description": null,
    "position": 1,
    "children": [],
    "permissions": []
  }
}

acpt/save-option-page

Input

Property
Type
Required
Notes

menu_slug

string

Yes

If a page with this menu slug already exists, it's updated instead of duplicated

page_title

string

Yes

menu_title

string

Yes

capability

string

Yes

The WordPress capability required to see the page in wp-admin, e.g. manage_options

position

integer

Yes

Menu position

icon

string

No

Any Dashicon slug

description

string

No

parent

string

No

menu_slug of another option page, to make this one a submenu item under it

permissions

array

No

acpt/delete-option-page

Input

Property
Type
Required
Description

menu_slug

string

Yes

delete_options

boolean

No

true also deletes every stored option value on that page. Defaults to false

Last updated