MslsMenu.phpis the WordPress bootstrap; add hooks here or split helpers into new subdirectories undermslsmenu/as needed.mslsmenu/mirrors the shipping bundle; keep source and bundle in sync before release.languages/stores translation assets; regenerate viawp i18n make-potwhen strings move.tests/houses Pest specs with Brain Monkey shims intests/Pest.php; colocate fixtures with their specs.bin/contains release tooling (bin/git-release.sh); prefer extending scripts over one-off commands.
- Run
composer installafter cloning to pull dev dependencies. composer testexecutes the Pest suite with mocked WordPress APIs.composer analyzeruns PHPStan (level 5) againstMslsMenu.php; keep it passing before pushing.composer coverageenables Xdebug coverage for pull request evidence.composer buildtriggersbin/git-release.sh, refreshingmslsmenu/andmslsmenu.zipfor distribution.
- Follow WordPress PHP standards: tabs for indentation, braces on new lines, no trailing commas.
- Include
declare(strict_types=1);in new entry points and document public APIs with PHPDoc. - Use
snake_casefor hook callbacks,PascalCasefor classes, andcamelCasefor internal helpers unless a hook signature dictates otherwise.
- Place new specs in
tests/YourFeatureTest.php; keep case names descriptive (it('renders menu item')). - Stub external WP functions with Brain Monkey setup blocks to keep tests deterministic.
- Run
composer coveragefor behavioral changes and share the summary when coverage changes noticeably.
- Write short imperative subjects (≈50 chars) such as
Clean menu walker output; batch related edits together. - Reference GitHub issues in the body (
Refs #123) and list the commands you ran. - PRs should explain the problem, outline the fix, attach UI evidence when relevant, and confirm
composer testpluscomposer analyze.
- Bump the plugin header version in
MslsMenu.phpand sync the same value intoreadme.txtbefore building. - Run
composer build, inspect the refreshedmslsmenu/contents, and spot-check the generatedmslsmenu.zipbefore tagging.