From 30c8f59d69ff879a2ba0e61cb149f26c88bb1d17 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Fri, 29 Mar 2024 10:50:47 +0200 Subject: [PATCH 1/5] fix: disable default redirect on plugin install --- .wordpress-org/blueprints/blueprint.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 94a85f4a..b118e364 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -1,6 +1,6 @@ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", - "landingPage": "/wp-admin/admin.php?page=visualizer-setup-wizard&env=preview", + "landingPage": "\/wp-admin\/admin.php?page=visualizer-setup-wizard&env=preview", "preferredVersions": { "php": "8.0", "wp": "latest" @@ -23,6 +23,10 @@ "options": { "activate": true } + }, + { + "step": "wp-cli", + "command": "wp option update visualizer_fresh_install 1" } ] } From 0535134cb070ebf0366859042dac5d125726b344 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Fri, 29 Mar 2024 10:55:45 +0200 Subject: [PATCH 2/5] fix: add tab and query step --- .wordpress-org/blueprints/blueprint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index b118e364..f728987d 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -1,6 +1,6 @@ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", - "landingPage": "\/wp-admin\/admin.php?page=visualizer-setup-wizard&env=preview", + "landingPage": "\/wp-admin\/admin.php?page=visualizer-setup-wizard&env=preview&tab#step-1", "preferredVersions": { "php": "8.0", "wp": "latest" From 79a2d244f4d5443a92879c4ad3ab6afaf8d48b18 Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Fri, 29 Mar 2024 11:05:42 +0200 Subject: [PATCH 3/5] chore: tweak --- .wordpress-org/blueprints/blueprint.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index f728987d..887be1a7 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -9,6 +9,10 @@ "networking": true }, "steps": [ + { + "step": "wp-cli", + "command": "wp option update visualizer_fresh_install 1" + }, { "step": "login", "username": "admin", @@ -23,10 +27,6 @@ "options": { "activate": true } - }, - { - "step": "wp-cli", - "command": "wp option update visualizer_fresh_install 1" } ] } From 895f6bd403a2f96733c5d81eeb9bc258565c7bcc Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Fri, 29 Mar 2024 11:13:32 +0200 Subject: [PATCH 4/5] chore: tweak --- .wordpress-org/blueprints/blueprint.json | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 887be1a7..b72d790c 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -9,15 +9,6 @@ "networking": true }, "steps": [ - { - "step": "wp-cli", - "command": "wp option update visualizer_fresh_install 1" - }, - { - "step": "login", - "username": "admin", - "password": "password" - }, { "step": "installPlugin", "pluginZipFile": { @@ -27,6 +18,19 @@ "options": { "activate": true } + }, + { + "step": "wp-cli", + "command": "wp option update visualizer_fresh_install 1" + }, + { + "step": "wp-cli", + "command": "wp option delete visualizer-activated" + }, + { + "step": "login", + "username": "admin", + "password": "password" } ] } From 70574cefc77f669fc2f0c2e4434a81eee28da29a Mon Sep 17 00:00:00 2001 From: "Soare Robert Daniel (Mac 2023)" Date: Fri, 29 Mar 2024 12:34:13 +0200 Subject: [PATCH 5/5] chore: update docs --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 13c4dfab..edff76a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -436,3 +436,6 @@ Examples: > [!NOTE] > 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) + +> [!NOTE] +> 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).