Files
wp-plugin-starter-template-…/playground/multisite-blueprint.json

66 lines
1.8 KiB
JSON

{
"landingPage": "/wp-admin/network/",
"preferredVersions": {
"php": "8.0",
"wp": "latest"
},
"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": "login",
"username": "admin",
"password": "password"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding/archive/refs/heads/feature/testing-framework.zip"
}
},
{
"step": "activatePlugin",
"pluginSlug": "wp-plugin-starter-template-for-ai-coding-feature-testing-framework",
"networkWide": true
},
{
"step": "runPHP",
"code": "<?php\n// Create a test subsite\n$domain = 'localhost';\n$path = '/testsite/';\n$title = 'Test Subsite';\n$user_id = 1;\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"
}
]
}