Playground preview
How the WordPress Playground live preview works for this plugin, which blueprint is authoritative, and how to run it locally.
The blueprints
Section titled “The blueprints”The repo carries two blueprints with different jobs:
assets/blueprints/blueprint.json— the authoritative Live Preview blueprint. It enables Inspector Controls and publishes a demo page at/xfn-demo/with XFN-tagged inline links, a button, and an embed.deploy-blueprint-only.shpublishes exactly this file to the WordPress.org SVNassets/blueprints/path, which is what the listing’s Live Preview button loads. (blueprint-improved.jsonin the same directory is an identical working copy.)blueprint.json(repo root) — an older variant that installs the plugin and lands on a new draft post instead of the demo page. Kept for reference; not deployed. Reconciling the two is flagged in the documentation plan.
There is also screenshots/docs-blueprint.json, a derivative used only by the documentation capture script (npm run screenshots:docs).
Run the preview locally
Section titled “Run the preview locally”npx @wp-playground/cli@latest server --auto-mount . --blueprint screenshots/docs-blueprint.json --login --port 9400Then open http://127.0.0.1:9400/xfn-demo/. This boots your working copy (no Docker) with the same demo content the Live Preview uses. Verified working on WordPress 7.0.1.
Known issue with the demo page
Section titled “Known issue with the demo page”When the demo steps run on WordPress 7.0.1 locally, the published /xfn-demo/ page renders its links without rel attributes — so the demo doesn’t actually demonstrate the plugin’s output, and frontend tooltips (a WordPress 7.0+ feature) can’t appear there either. Whether the blueprint content or a save-time filter strips them needs maintainer investigation; it’s item 12 in the documentation plan. Until then, the most reliable way to verify output is the testing guide.
WordPress.org Live Preview (maintainer actions)
Section titled “WordPress.org Live Preview (maintainer actions)”The live listing already shows a Live Preview button, currently serving the blueprint deployed with 1.0.3. To refresh it:
- Fix the demo-page
relissue above (otherwise the preview shows plain links). - Run
deploy-blueprint-only.shto publishassets/blueprints/blueprint.jsonto SVN without a full release — or include it in the next full deploy. Note the deploy scripts still hardcode old versions/slugs (flagged in the documentation plan); review them before running.