SettingsUIPageInterface
in
Contract for settings pages that opt into the settings UI renderer.
Tags
Table of Contents
- get_page_id() : string
- Get the stable page id used for scoping the settings UI.
- get_save_adapter() : string
- Get the default save adapter for fields on this page.
- get_schema() : array<string|int, mixed>
- Build the canonical settings schema for a section.
- get_script_handles() : array<string|int, string>
- Get script handles that must be loaded before the settings UI app mounts.
Methods
get_page_id()
Get the stable page id used for scoping the settings UI.
public
get_page_id() : string
Tags
Return values
string —get_save_adapter()
Get the default save adapter for fields on this page.
public
get_save_adapter(string $section) : string
Supported values are form_post and none.
Parameters
- $section : string
-
Section id. Empty string means the default section.
Tags
Return values
string —get_schema()
Build the canonical settings schema for a section.
public
get_schema(string $section) : array<string|int, mixed>
The shell.sectionNavigation key controls the sibling-section navigation
rendered by the Settings UI shell, and only applies to drill-down pages
(sections of the Payments tab). Set a custom array of id/label/href/
active entries to own the navigation, or omit the key to render none;
drill-down pages default to header breadcrumbs instead. Top-level settings
pages render the classic section links and ignore this key.
Parameters
- $section : string
-
Section id. Empty string means the default section.
Tags
Return values
array<string|int, mixed> —get_script_handles()
Get script handles that must be loaded before the settings UI app mounts.
public
get_script_handles(string $section) : array<string|int, string>
Parameters
- $section : string
-
Section id. Empty string means the default section.
