Skip to content

Commit ed15e03

Browse files
committed
Update README
1 parent 166b341 commit ed15e03

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

README.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,30 @@ You can connect to the Playground using the JavaScript client. Here's an example
4646
<script type="module">
4747
import { startPlayground } from '@wp-playground/client';
4848
49-
const client = await startPlayground({
50-
iframe: document.getElementById('wp'),
51-
remoteUrl: 'https://playground.wordpress.net/remote.html',
49+
const client = await loadPlayground({
50+
iframe,
51+
remoteUrl: `https://playground.wordpress.net/remote.html`,
5252
blueprint: {
53+
landingPage: '/wp-admin/',
5354
preferredVersions: {
5455
php: '8.0',
55-
wp: 'latest'
56+
wp: 'latest',
5657
},
57-
steps: {
58-
{ "step": "login", "username": "admin", "password": "password" },
59-
{ "goTo": "/wp-admin/post-new.php" }
60-
}
61-
}
58+
steps: [
59+
{
60+
step: 'login',
61+
username: 'admin',
62+
password: 'password',
63+
},
64+
{
65+
step: 'installPlugin',
66+
pluginZipFile: {
67+
resource: 'wordpress.org/plugins',
68+
slug: 'friends',
69+
},
70+
},
71+
],
72+
},
6273
});
6374
6475
const response = await client.run({

0 commit comments

Comments
 (0)