File tree Expand file tree Collapse file tree 1 file changed +20
-9
lines changed Expand file tree Collapse file tree 1 file changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -46,19 +46,30 @@ You can connect to the Playground using the JavaScript client. Here's an example
46
46
<script type =" module" >
47
47
import { startPlayground } from ' @wp-playground/client' ;
48
48
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` ,
52
52
blueprint: {
53
+ landingPage: ' /wp-admin/' ,
53
54
preferredVersions: {
54
55
php: ' 8.0' ,
55
- wp: ' latest'
56
+ wp: ' latest' ,
56
57
},
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
+ },
62
73
});
63
74
64
75
const response = await client .run ({
You can’t perform that action at this time.
0 commit comments