-
Notifications
You must be signed in to change notification settings - Fork 0
Architecture
A small Laravel-flavoured core wraps WordPress so you declare features instead of wiring hooks by hand.
-
wp-plugin-matrix-starter.phpdefines constants, loads the autoloader, and binds the Lifecycle to activation/deactivation. It also registers the WP-CLI commands underdefined('WP_CLI'). - On
plugins_loaded(and during (de)activation) it bootsapp/bootstrap.php: constructs theApplication(a DI Container), wires the Facades to it, and registers two ServiceProviders. -
AppServiceProvider::boot()includesroutes.php+hooks.php, sets the Tracer gate, thenRouter::register()andHook::register_all_hooks(). Oninitit emits the Localized Routes (window.wppmRoutes) onto the admin script. -
AdminServiceProvider::boot()instantiates each AdminPage, registers it (admin_menu), and emitswindow.wppmListPagesfor ListPages.
Visual map: open
docs/architecture-graph.htmlfrom the source tree.
| Module | Responsibility |
|---|---|
Core/Application + Container
|
DI container; resolve services anywhere via wp_plugin_matrix_app('x'). |
Core/Router |
Single seam for REST + AJAX routes; nonce/method/capability enforcement. |
Core/Hook |
Registry for WP add_action/add_filter. |
Core/AdminPage / ListPage
|
Declarative admin screens; ListPage adds Model-backed CRUD + 5 auto REST routes. |
Model/BaseModel |
Thin wpdb ORM: fill/validate/save/paginate with $rules/$fillable/$sortable. |
Core/Lifecycle + Database/Migrations/Migrator
|
Activation/uninstall orchestration + versioned migrations. |
Core/Tracer |
Gated recorder that decorates the Hook/Router callables into a per-request trace. |
Facades/ (Asset/Cache/Config) |
Static entry points to deep services. |
Helpers/ |
SettingsPage, Notice, CPT, Cron. |
The project keeps a deliberate vocabulary (see CONTEXT.md): AdminPage, ListPage, Route
(REST/AJAX), Rules, Localized Routes, Notice, Hook, Lifecycle, Migration,
Migrator, Tracer, Generator, Personalizer. Use these terms when naming your own modules.
Route names, the wppm/* hook/filter names, the wp-plugin-matrix/v1 REST namespace, the
wp_plugin_matrix nonce action, and the wppmRoutes/wppmListPages localized-object shapes are
consumed by downstream code and the JS layer. Treat them as a public API.
WP Plugin Matrix · GPL-2.0-or-later · source · pages are generated from docs/wiki/ — edit there, not in the wiki UI.
Seams
Tooling