Admin
The Admin package provides plain PHP admin pages for managing T2 blocks and extensions within WordPress, registered under a top-level "T2" menu.
Last modified: September 15, 2026
Structure
- src/admin.php
Registers a top-level "T2" admin menu with "Blocks" and "Extensions" submenu pages, and renders each as a plain checkbox list backed by the WordPress Settings API.
Features
- Registers a top-level "T2" menu with "Blocks" and "Extensions" submenu pages.
- Lists available blocks/extensions as checkboxes, saved via
options.phplike any native WordPress settings page. - Must-use blocks/extensions are always active and are not listed, since they can't be toggled.
Hooks
admin/src/admin.php
T2 Admin Menu Page Title.
This filter allows you to change the title of the T2 admin menu page.
apply_filters( 't2/admin/menu_page/title', string $title )| Parameter | Type | Description |
|---|---|---|
$title |
string |
The title of the T2 admin menu page. |
T2 Admin Menu Page Icon.
This filter allows you to change the icon of the T2 admin menu page.
apply_filters( 't2/admin/menu_page/icon', string $icon )| Parameter | Type | Description |
|---|---|---|
$icon |
string |
The base64 encoded SVG icon. |