From c0748c0d0b239f49e49ecaa8da4c569f0843f6f0 Mon Sep 17 00:00:00 2001 From: marcusquinn <6428977+marcusquinn@users.noreply.github.com> Date: Mon, 21 Apr 2025 23:25:17 +0100 Subject: [PATCH] Simplify WordPress Playground multisite blueprint --- .wiki/Playground-Testing.md | 4 +- .wiki/Testing.md | 2 +- playground/multisite-blueprint.json | 57 ++++------------------------- playground/multisite.html | 2 +- 4 files changed, 12 insertions(+), 53 deletions(-) diff --git a/.wiki/Playground-Testing.md b/.wiki/Playground-Testing.md index 9512ea1..8ac7425 100644 --- a/.wiki/Playground-Testing.md +++ b/.wiki/Playground-Testing.md @@ -17,7 +17,7 @@ The easiest way to test our plugin with WordPress Playground is to use the onlin 1. Single site testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=4) -2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=5) +2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=6) These links will automatically set up WordPress with our plugin installed and activated. @@ -32,7 +32,7 @@ To run tests with WordPress Playground: 1. Open the appropriate WordPress Playground link: - [Single site](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=4) - - [Multisite](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=5) + - [Multisite](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=6) 2. Test the plugin manually in the browser diff --git a/.wiki/Testing.md b/.wiki/Testing.md index 6bcd5ee..2f3c4ba 100644 --- a/.wiki/Testing.md +++ b/.wiki/Testing.md @@ -106,7 +106,7 @@ The easiest way to test our plugin with WordPress Playground is to use the onlin 1. Single site testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/blueprint.json&_t=4) -2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=5) +2. Multisite testing: [Open in WordPress Playground](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/wpallstars/wp-plugin-starter-template-for-ai-coding/feature/testing-framework/playground/multisite-blueprint.json&_t=6) These links will automatically set up WordPress with a sample plugin installed and activated. diff --git a/playground/multisite-blueprint.json b/playground/multisite-blueprint.json index 9658e2e..7dc1acc 100644 --- a/playground/multisite-blueprint.json +++ b/playground/multisite-blueprint.json @@ -1,52 +1,11 @@ { - "landingPage": "/wp-admin/network/", + "landingPage": "/wp-admin/", "login": true, - "steps": [ - { - "step": "defineWpConfig", - "name": "WP_ALLOW_MULTISITE", - "value": true - }, - { - "step": "defineWpConfig", - "name": "MULTISITE", - "value": true - }, - { - "step": "defineWpConfig", - "name": "SUBDOMAIN_INSTALL", - "value": false - }, - { - "step": "defineWpConfig", - "name": "DOMAIN_CURRENT_SITE", - "value": "localhost" - }, - { - "step": "defineWpConfig", - "name": "PATH_CURRENT_SITE", - "value": "/" - }, - { - "step": "defineWpConfig", - "name": "SITE_ID_CURRENT_SITE", - "value": 1 - }, - { - "step": "defineWpConfig", - "name": "BLOG_ID_CURRENT_SITE", - "value": 1 - }, - { - "step": "installPlugin", - "pluginData": { - "resource": "wordpress.org/plugins", - "slug": "coblocks" - } - }, - { - "step": "runPHP", - "code": "get_error_message();\n } else {\n echo 'Created subsite with ID: ' . $blog_id;\n }\n} else {\n echo 'Subsite already exists';\n}\n" - } - ] + "preferredVersions": { + "php": "8.0", + "wp": "latest" + }, + "features": { + "networking": true + } } diff --git a/playground/multisite.html b/playground/multisite.html index dbadb7a..46fd01d 100644 --- a/playground/multisite.html +++ b/playground/multisite.html @@ -20,6 +20,6 @@
- +