wordpress/WordPress Playground Preview
Automatically add a "Preview in WordPress Playground" button to your pull requests for easy testing of WordPress plugins and themes.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| mode | How to publish the preview button: `append-to-description` or `comment` | — | append-to-description |
| playground-host | Base WordPress Playground host URL | — | https://playground.wordpress.net |
| blueprint | Custom WordPress Blueprint as a JSON string. When provided, `plugin-path` and `theme-path` are ignored. | — | — |
| blueprint-url | URL pointing to a remote blueprint. When provided, the Playground link uses `?blueprint-url={url}` directly. | — | — |
| plugin-path | Path to plugin directory inside the repository (e.g., `.` for root or `plugins/my-plugin`) | — | — |
| theme-path | Path to theme directory inside the repository (e.g., `.` for root or `themes/my-theme`) | — | — |
| description-template | Custom markdown/HTML template for PR descriptions (supports {{VARIABLE_NAME}} interpolation) | — | — |
| comment-template | Custom markdown/HTML template for PR comments (supports {{VARIABLE_NAME}} interpolation) | — | — |
| restore-button-if-removed | Whether to restore the preview button if removed by PR author (only applies to `append-to-description` mode) | — | true |
| github-token | GitHub token for updating PRs. Required permissions: `pull-requests: write`, `contents: read` | — | — |
| pr-number | Pull request number (optional, defaults to context.payload.pull_request.number). When provided, all PR details will be fetched from the GitHub API. | — | — |
Outputs
| name | description |
|---|---|
| preview-url | Direct link to the generated WordPress Playground instance. |
| blueprint-json | JSON blueprint (stringified) used for the preview. |
| rendered-description | Markdown/HTML snippet inserted into the PR description. |
| rendered-comment | Markdown/HTML snippet used when posting a comment. |
| mode | Effective preview publishing mode (append-to-description or comment). |
| comment-id | ID of the managed preview comment (if applicable). |