Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WP Playground blueprint #27

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Image Comparison provides a versatile draggable slider component that allows use

[![Image comparison demo](docs/demo.png)](https://vimeo.com/1000389315)

Try it out in the [WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/bigbite/image-comparison/main/docs/playground/blueprint.json)!

## Documentation

### Installing
Expand Down Expand Up @@ -72,4 +74,4 @@ Image Comparison requires these software with the following versions:

## Contributing

Please read [Code of Conduct](./CODE_OF_CONDUCT.md) for details on our code of conduct and [Contributing](./CONTRIBUTING.md) for details on the process for submitting pull requests to us.
Please read [Code of Conduct](./CODE_OF_CONDUCT.md) for details on our code of conduct and [Contributing](./CONTRIBUTING.md) for details on the process for submitting pull requests to us.
Binary file added docs/playground/after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/playground/before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions docs/playground/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"preferredVersions": {
"php": "8.2",
"wp": "latest"
},
"phpExtensionBundles": [
"kitchen-sink"
],
"features": {
"networking": true
},
"landingPage": "/?p=1",
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "https://github-proxy.com/proxy/?repo=bigbite/image-comparison&branch=main-built"
},
"options": {
"activate": true
}
},
{
"step": "wp-cli",
"command": "wp media import --post_id=1 https://raw.githubusercontent.com/bigbite/image-comparison/main/docs/playground/before.png"
},
{
"step": "wp-cli",
"command": "wp media import --post_id=1 https://raw.githubusercontent.com/bigbite/image-comparison/main/docs/playground/after.png"
},
{
"step": "runPHP",
"code": "<?php require_once 'wordpress/wp-load.php';wp_delete_comment(1);$GLOBALS['wpdb']->update('wp_posts',['post_title'=>'Image Comparison Example','post_content'=>base64_decode('PCEtLSB3cDpiaWdiaXRlL2ltYWdlLWNvbXBhcmlzb24geyJjYXB0aW9uIjoiUGhvdG8gYnkgXHUwMDNjYSBocmVmPVx1MDAyMmh0dHBzOi8vdW5zcGxhc2guY29tL0BqYmNyZWF0ZV9cdTAwMjJcdTAwM2VKb3NlcGggQmFycmllbnRvc1x1MDAzYy9hXHUwMDNlIHZpYSBVbnNwbGFzaC4iLCJjb250YWluZXJIZWlnaHQiOiI2MjBweCIsImNvbnRhaW5lcldpZHRoIjoiNjIwcHgiLCJhbGlnbiI6ImNlbnRlciJ9IC0tPgo8IS0tIHdwOmJpZ2JpdGUvaW1hZ2UtY29tcGFyaXNvbi1pdGVtIHsiaWQiOjV9IC8tLT4KCjwhLS0gd3A6YmlnYml0ZS9pbWFnZS1jb21wYXJpc29uLWl0ZW0geyJpZCI6NH0gLy0tPgo8IS0tIC93cDpiaWdiaXRlL2ltYWdlLWNvbXBhcmlzb24gLS0+'),'comment_status'=>'closed','ping_status'=>'closed'],['id'=>1]);?>"
}
]
}