Fix WordPress Playground multisite blueprint
This commit is contained in:
@@ -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)
|
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=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)
|
||||||
|
|
||||||
These links will automatically set up WordPress with our plugin installed and activated.
|
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:
|
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)
|
- [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=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)
|
||||||
|
|
||||||
2. Test the plugin manually in the browser
|
2. Test the plugin manually in the browser
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
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=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)
|
||||||
|
|
||||||
These links will automatically set up WordPress with a sample plugin installed and activated.
|
These links will automatically set up WordPress with a sample plugin installed and activated.
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,52 @@
|
|||||||
{
|
{
|
||||||
"landingPage": "/wp-admin/",
|
"landingPage": "/wp-admin/network/",
|
||||||
"login": true,
|
"login": true,
|
||||||
"features": {
|
|
||||||
"networking": true
|
|
||||||
},
|
|
||||||
"steps": [
|
"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",
|
"step": "installPlugin",
|
||||||
"pluginData": {
|
"pluginData": {
|
||||||
"resource": "wordpress.org/plugins",
|
"resource": "wordpress.org/plugins",
|
||||||
"slug": "coblocks"
|
"slug": "coblocks"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"step": "runPHP",
|
||||||
|
"code": "<?php\n// Create a test subsite\n$domain = 'localhost';\n$path = '/testsite/';\n$title = 'Test Subsite';\n$user_id = 1;\n\nrequire_once('/wordpress/wp-load.php');\n\nif (!function_exists('get_site_by_path')) {\n require_once('/wordpress/wp-includes/ms-blogs.php');\n}\n\nif (!get_site_by_path($domain, $path)) {\n $blog_id = wpmu_create_blog($domain, $path, $title, $user_id);\n if (is_wp_error($blog_id)) {\n echo 'Error creating subsite: ' . $blog_id->get_error_message();\n } else {\n echo 'Created subsite with ID: ' . $blog_id;\n }\n} else {\n echo 'Subsite already exists';\n}\n"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,6 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<iframe src="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=4"></iframe>
|
<iframe src="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"></iframe>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user