Docs: replace rewrite-flushing writeFile examples - #3806
Conversation
brandonpayton
left a comment
There was a problem hiding this comment.
Hi @ekamran, I left more review notes for this PR. Thank you!
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates documentation examples to avoid flushing rewrite rules on every request, replacing them with safer mu-plugin examples and aligning guidance with Playground’s permalink setup behavior.
Changes:
- Replaced rewrite-rule flushing
writeFileexamples with harmless mu-plugin snippets (body class / admin footer text). - Updated the blueprint example landing page to
/wp-admin/and simplified steps. - Adjusted
writeFilestep documentation reference.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/docs/site/docs/main/guides/for-theme-developers.md | Replaces rewrite flushing mu-plugin example with a demo body class example; updates writeFile link. |
| packages/docs/site/docs/blueprints/08-examples.md | Replaces rewrite flushing mu-plugin example with an admin footer customization example; updates landing page. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Updated the mu-plugin wording to avoid the a/an confusion. I kept the writeFile link as it is because the direct step anchors are already reported as broken in the docs build. |
## Summary - Remove the stale `rewrite.php` mu-plugin example that calls `flush_rules()`. - Use a small `writeFile` example that adds a demo body class instead. - Switch the Kanso theme source to `git:directory` so PR Blueprint validation accepts the external source. - Point the WXR import to this branch raw URL for PR validation. ## Dependency This supports WordPress/wordpress-playground#3806. Once this PR lands, that Playground docs PR can keep the Run Blueprint link pointing to Blueprints `trunk`. cc @bgrgicak based on the review direction in WordPress/wordpress-playground#3806. ## Testing - `git diff --check` - `GITHUB_BRANCH='remove-theme-demo-flush-rules' CHANGED_FILES='blueprints/install-activate-setup-theme-from-gh-repo/blueprint.json' npm run validate:pr-blueprints`
cd63881 to
b1c36ab
Compare
Summary
writeFileexamples that flushed rewrite rules on every request with harmless mu-plugin exampleswriteFiledocumentation link to use the generatedWriteFileStepanchorFixes #2195
Testing
git diff --checknpx prettier --check packages/docs/site/docs/blueprints/08-examples.md packages/docs/site/docs/main/guides/for-theme-developers.mdnpx nx build docs-siteThe docs build still reports existing TypeDoc/Docusaurus warnings unrelated to this change.