Skip to content

Commit fab02a2

Browse files
Stop auto-redirect in Preview (#1105)
fix: disable default redirect on plugin install
1 parent a8a5feb commit fab02a2

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed
Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
3-
"landingPage": "/wp-admin/admin.php?page=visualizer-setup-wizard&env=preview",
3+
"landingPage": "\/wp-admin\/admin.php?page=visualizer-setup-wizard&env=preview&tab#step-1",
44
"preferredVersions": {
55
"php": "8.0",
66
"wp": "latest"
@@ -9,11 +9,6 @@
99
"networking": true
1010
},
1111
"steps": [
12-
{
13-
"step": "login",
14-
"username": "admin",
15-
"password": "password"
16-
},
1712
{
1813
"step": "installPlugin",
1914
"pluginZipFile": {
@@ -23,6 +18,19 @@
2318
"options": {
2419
"activate": true
2520
}
21+
},
22+
{
23+
"step": "wp-cli",
24+
"command": "wp option update visualizer_fresh_install 1"
25+
},
26+
{
27+
"step": "wp-cli",
28+
"command": "wp option delete visualizer-activated"
29+
},
30+
{
31+
"step": "login",
32+
"username": "admin",
33+
"password": "password"
2634
}
2735
]
2836
}

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,3 +436,6 @@ Examples:
436436

437437
> [!NOTE]
438438
> Make sure to respect the [schema](https://github.com/WordPress/wordpress-playground/blob/trunk/packages/playground/blueprints/public/blueprint-schema.json). You can validate your blueprint using a schema validator: [online](https://www.jsonschemavalidator.net/), [CLI](https://ajv.js.org/packages/ajv-cli.html)
439+
440+
> [!NOTE]
441+
> To test the blueprint, you can publish the branch and append the `blueprint.json` path to the URL: `https://playground.wordpress.net/?plugin=visualizer&blueprint-url=`. [Example](https://playground.wordpress.net/?plugin=visualizer&blueprint-url=https://raw.githubusercontent.com/Codeinwp/visualizer/fix/blueprint-redirect/.wordpress-org/blueprints/blueprint.json).

0 commit comments

Comments
 (0)