Add support for the WordPress.org plugin preview#183
Merged
Conversation
added 2 commits
December 15, 2023 14:10
…ent. Also add some demo data we can import
jeffpaul
approved these changes
Dec 18, 2023
Member
jeffpaul
left a comment
There was a problem hiding this comment.
Looks good, thanks for setting up!
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.
Description of the Change
WordPress.org recently launched support for plugin previews utilizing the WordPress Playground feature. Plugins wanting to take advantage of this need to opt in by setting up a
blueprint.jsonfile that configures how the preview should load. This PR adds in that file that does the following:Note that this PR is targeted to
trunkas the hope is we can take advantage of our Plugin Asset Update Action to deploy these changes without having to push out a new release. This PR also fixes that Action.Also note once these changes are on .org, the preview button will need to be enabled in a test state. Once verified as working, we can enable it for all users.
How to test the Change
The WordPress Playground allows you to spin up a new environment directly through the URL, by going to
https://playground.wordpress.net/#and pasting your JSON config after the#. In this case, the URL should be: https://playground.wordpress.net/#{%22$schema%22:%22https://playground.wordpress.net/blueprint-schema.json%22,%22landingPage%22:%22/wp-admin/edit.php?post_type=page%22,%22preferredVersions%22:{%22php%22:%227.4%22,%22wp%22:%22latest%22},%22phpExtensionBundles%22:[%22kitchen-sink%22],%22steps%22:[{%22step%22:%22login%22,%22username%22:%22admin%22,%22password%22:%22password%22},{%22step%22:%22importFile%22,%22file%22:{%22resource%22:%22url%22,%22url%22:%22https://raw.githubusercontent.com/10up/simple-page-ordering/02d35c792a11be5f863c44308485e85505c48f17/.wordpress-org/blueprints/demo-data.xml%22}},{%22step%22:%22installPlugin%22,%22pluginZipFile%22:{%22resource%22:%22wordpress.org/plugins%22,%22slug%22:%22simple-page-ordering%22},%22options%22:{%22activate%22:true}}]}Changelog Entry
Credits
Props @dkotter
Checklist: