Declarative WordPress settings framework. Define your settings page in PHP arrays — tabs, sections, fields, validation — and get a React-powered admin UI automatically.
| Requirement | Version |
|---|---|
| PHP | >= 7.4 |
| WordPress | >= 6.0 |
composer require millipress/millibaseuse MilliBase\Manager;
$manager = new Manager([
'slug' => 'my-plugin',
'option_name' => 'my_plugin_settings',
'page_title' => 'My Plugin',
'menu_title' => 'My Plugin',
'rest_namespace' => 'my-plugin/v1',
'basename' => plugin_basename(__FILE__),
'header' => ['title' => 'My Plugin Settings'],
'tabs' => [
[
'name' => 'general',
'title' => 'General',
'sections' => [
[
'id' => 'main',
'title' => 'Main Settings',
'fields' => [
[
'key' => 'general.enabled',
'type' => 'toggle',
'label' => 'Enable Feature',
'default' => true,
],
],
],
],
],
],
]);
// Programmatic access:
$manager->settings()->get('general.enabled'); // true- Declarative schema — define tabs, sections, and fields in PHP arrays
- React admin UI — auto-generated from the schema using
@wordpress/components - 9 built-in field types — text, number, password, toggle, select, unit, token-list, color, code
- Custom extensibility — register custom field types and custom tab components from JS
- Conditional display — show/hide fields based on other settings values
- Settings priority — constants > config file > database > defaults
- Encryption — automatic sodium encryption for sensitive fields (keys prefixed with
enc_) - Config file sync — write settings to PHP files for pre-WordPress access
- Backup & restore — transient-based backup with 12-hour expiry
- Import / export — settings serialization with encryption handling
- Tab overrides — add-on plugins can extend or replace tabs and sections via filters
- REST API — save, reset, restore, status, and custom action endpoints
Full documentation is in the docs/ directory:
- Introduction
- Installation
- Configuration
- Schema Definition
- Programmatic Access
- Custom Field Types
- Custom Tab Components
- Extending with Filters
- Reference: Field Types · Settings API · Hooks & Filters
GPL-2.0-or-later