-
Notifications
You must be signed in to change notification settings - Fork 0
Demo and Reset
The scaffold ships a kitchen-sink Task feature so you can see every seam working end-to-end, then remove it in one command when you're ready to build your own thing.
app/Model/Task.php, app/Admin/TasksListPage.php, app/Http/Controllers/TasksController.php, the
Task*Handler hooks, the CreateTasksTable migration, and app/Views/tasks.php together demonstrate:
- a Model with Rules → a ListPage CRUD table with the 5 auto REST routes + a rules-derived edit form,
- a
taskCPT, a[wppm-tasks]shortcode (advertised on the admin page), - a
tasks.statsAJAX route (Cache-backed), - a daily cron ("prune trashed tasks") via the
wppm/lifecycle/cron_eventsfilter, - a seed + activation Notice ("Demo data seeded") via
wppm/lifecycle/seed_defaults, - light use of the
ConfigandCachefacades.
Read it, copy from it, then strip it.
The Vue admin SPA also ships demo pages alongside the real ones: a Contact form (a validation
example) and a Components Demo (an Element Plus showcase). The real pages are the Dashboard and the
Settings form (Settings.vue) — which is the plugin's single settings screen (there is no separate
Settings list page).
wp matrix:clean --dry-run # preview exactly what will be removed (changes nothing)
wp matrix:clean # delete the demo files + their registration lines- Requires the plugin active (it's a WP-CLI command the plugin registers).
- Idempotent — re-running reports "nothing to remove".
-
Drift-safe — if the demo files/registrations were hand-edited, it refuses and lists what drifted
(pass
--forceto override). This prevents leaving a dangling registration pointing at a deleted class. -
Source-only — it deletes the demo's files and removes the exact lines it added; it does not touch
the database, seeded rows, or cron. That teardown is the uninstall flow, gated behind
apply_filters('wppm/uninstall_destructive', false). -
Strips the demo admin pages too — besides the Task feature, clean removes the Vue SPA's Contact
and Components Demo pages (their
Pages/*.vue, route entries inroutes.js, and sidebar items inComponents/AdminMenu.vue). Runnpm run buildafter a real clean to rebuild the SPA without them.
What survives a clean: the framework (app/Core, Facades, Helpers) and the Config/Cache bindings; the
admin SPA's real Dashboard + Settings form (the single settings screen) + 404 page; the Tracer
diagnostics page; the Settings model; and all the matrix:make:* generators — i.e. a clean, fully
working starter.
WP Plugin Matrix · GPL-2.0-or-later · source · pages are generated from docs/wiki/ — edit there, not in the wiki UI.
Seams
Tooling