feat: backfill Settings and Example modules#15
Merged
justlevine merged 5 commits intomainfrom Mar 23, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR backfills “Settings” and “Example” modules into the plugin skeleton, including a basic admin settings screen/template and corresponding unit tests organized by module namespaces.
Changes:
- Adds
Modules\Example(CPT, taxonomy, meta, REST controller) andModules\Settings(settings registration + admin screen). - Updates
Core\Assetsto separate frontend/admin/editor asset registration hooks. - Reorganizes/adds PHPUnit tests to mirror module namespaces and updates development/docs scaffolding notes.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/php/Unit/Modules/Settings/SettingsTest.php | Adds unit tests for settings registration and option helper. |
| tests/php/Unit/Modules/ExampleTest.php | Adds a smoke test for module hook registration. |
| tests/php/Unit/Modules/Example/Example_TaxonomyTest.php | Adds unit tests for taxonomy registration and associations. |
| tests/php/Unit/Modules/Example/Example_REST_ControllerTest.php | Adds unit tests for REST controller response and permissions. |
| tests/php/Unit/Modules/Example/Example_Post_Type_MetaTest.php | Adds unit tests for meta registration, sanitization, and REST updates. |
| tests/php/Unit/Modules/Example/Example_Post_TypeTest.php | Adds unit tests for CPT registration and taxonomy association. |
| tests/php/Unit/Modules/CLITest.php | Moves CLI tests into the Unit\Modules namespace. |
| tests/php/Unit/Modules/CLI/HealthcheckTest.php | Updates namespace/package tags to match module structure. |
| tests/php/Unit/Modules/Admin/Admin_ScreenTest.php | Adds unit tests for the settings admin screen/menu integration. |
| tests/php/Unit/Core/TemplatesTest.php | Moves Templates tests into the Unit\Core namespace. |
| tests/php/Unit/Core/AssetsTest.php | Updates Assets tests for new admin/editor registration methods. |
| tests/js/setup.ts | Removes unnecessary Jest mocks from setup. |
| templates/admin-screen.php | Adds the admin screen template markup. |
| plugin-skeleton-d.php | Removes unused basename constant. |
| inc/Modules/Settings/Settings.php | Implements settings registration and an option helper. |
| inc/Modules/Settings/Admin_Screen.php | Implements admin settings screen + plugin action link + script enqueue. |
| inc/Modules/Example/Example_Taxonomy.php | Adds an example taxonomy implementation. |
| inc/Modules/Example/Example_REST_Controller.php | Adds an example REST controller implementation. |
| inc/Modules/Example/Example_Post_Type_Meta.php | Adds example post meta registration with REST exposure. |
| inc/Modules/Example/Example_Post_Type.php | Adds an example CPT implementation. |
| inc/Modules/Example.php | Adds the Example module bootstrap/registrable list. |
| inc/Main.php | Registers the new modules in the plugin bootstrap. |
| inc/Core/Assets.php | Splits asset registration into frontend/admin/editor and updates hooks. |
| docs/DEVELOPMENT.md | Updates module directory layout and wp-env command examples. |
| README.md | Updates scaffolding/todo documentation to reflect new examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds example modules, and reorganizes the tests to follow the namespaces
Why
Backfilling usage examples.
Related Issue(s):
How
Testing Instructions
Screenshots
Additional Info
Checklist