Skip to content

Commit 6153f15

Browse files
authored
Adding reference to multiple theme URL parameter (#2593)
## Motivation for the change, related issues This PR updates the Query API documentation to reflect the ability to install multiple themes by repeating the theme URL parameter. Based on the recent implementation at #2581.
1 parent d5f8315 commit 6153f15

File tree

2 files changed

+25
-20
lines changed

2 files changed

+25
-20
lines changed

packages/docs/site/docs/developers/06-apis/query-api/01-index.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
sidebar_position: 5
33
slug: /developers/apis/query-api
4+
description: This page details the WordPress Playground Query API, letting you configure a WP instance via URL query parameters.
45
---
56

67
# Query API
@@ -21,26 +22,26 @@ You can go ahead and try it out. The Playground will automatically install the t
2122

2223
## Available options
2324

24-
| Option | Default Value | Description |
25-
| ------------------------ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26-
| `php` | `8.0` | Loads the specified PHP version. Accepts `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, `8.4` or `latest`. |
27-
| `wp` | `latest` | Loads the specified WordPress version. Accepts the last three major WordPress versions. As of June 1, 2024, that's `6.3`, `6.4`, or `6.5`. You can also use the generic values `latest`, `nightly`, or `beta`. |
28-
| `blueprint-url` | | The URL of the Blueprint that will be used to configure this Playground instance. |
29-
| `networking` | `yes` | Enables or disables the networking support for Playground. Accepts `yes` or `no`. |
30-
| `plugin` | | Installs the specified plugin. Use the plugin name from the WordPress Plugins Directory URL. For example, if the URL is `https://wordpress.org/plugins/wp-lazy-loading/`, the plugin name would be `wp-lazy-loading`. You can pre-install multiple plugins by saying `plugin=coblocks&plugin=wp-lazy-loading&…`. Installing a plugin automatically logs the user in as an admin. |
31-
| `theme` | | Installs the specified theme. Use the theme name from the WordPress Themes Directory URL. For example, if the URL is `https://wordpress.org/themes/disco/`, the theme name would be `disco`. Installing a theme automatically logs the user in as an admin. |
32-
| `url` | `/wp-admin/` | Load the specified initial WordPress page in this Playground instance. |
33-
| `mode` | `browser-full-screen` | Determines how the WordPress instance is displayed. Either wrapped in a browser UI or full width as a seamless experience. Accepts `browser-full-screen`, or `seamless`. |
34-
| `lazy` | | Defer loading the Playground assets until someone clicks on the "Run" button. Does not accept any values. If `lazy` is added as a URL parameter, loading will be deferred. |
35-
| `login` | `yes` | Log the user in as an admin. Accepts `yes` or `no`. |
36-
| `multisite` | `no` | Enables the WordPress multisite mode. Accepts `yes` or `no`. |
37-
| `import-site` | | Imports site files and database from a ZIP file specified by a URL. |
38-
| `import-wxr` | | Imports site content from a WXR file specified by a URL. It uses the WordPress Importer plugin, so the default admin user must be logged in. |
39-
| `site-slug` | | Selects which site to load from browser storage. |
40-
| `language` | `en_US` | Sets the locale for the WordPress instance. This must be used in combination with `networking=yes` otherwise WordPress won't be able to download translations. |
41-
| `core-pr` | | Installs a specific https://github.com/WordPress/wordpress-develop core PR. Accepts the PR number. For example, `core-pr=6883`. |
42-
| `gutenberg-pr` | | Installs a specific https://github.com/WordPress/gutenberg PR. Accepts the PR number. For example, `gutenberg-pr=65337`. |
43-
| `if-stored-site-missing` | | Indicates how to handle the scenario where the `site-slug` parameter identifies a site that does not exist. Use `if-stored-site-missing=prompt` to indicate that the user should be asked whether they would like to save a new site with the specified `site-slug`. |
25+
| Option | Default Value | Description |
26+
| ------------------------ | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27+
| `php` | `8.0` | Loads the specified PHP version. Accepts `7.0`, `7.1`, `7.2`, `7.3`, `7.4`, `8.0`, `8.1`, `8.2`, `8.3`, `8.4` or `latest`. |
28+
| `wp` | `latest` | Loads the specified WordPress version. Accepts the last three major WordPress versions. As of June 1, 2024, that's `6.3`, `6.4`, or `6.5`. You can also use the generic values `latest`, `nightly`, or `beta`. |
29+
| `blueprint-url` | | The URL of the Blueprint that will be used to configure this Playground instance. |
30+
| `networking` | `yes` | Enables or disables the networking support for Playground. Accepts `yes` or `no`. |
31+
| `plugin` | | Installs the specified plugin. Use the plugin name from the WordPress Plugins Directory URL. For example, if the URL is `https://wordpress.org/plugins/wp-lazy-loading/`, the plugin name would be `wp-lazy-loading`. You can pre-install multiple plugins by saying `plugin=coblocks&plugin=wp-lazy-loading&…`. Installing a plugin automatically logs the user in as an admin. More than one plugin could be installed, just repeating the `plugin` attribute on the URL. |
32+
| `theme` | | Installs the specified theme. Use the theme name from the WordPress Themes Directory URL. For example, if the URL is `https://wordpress.org/themes/disco/`, the theme name would be `disco`. Installing a theme automatically logs the user in as an admin. Multiples themes could be installed just repeating the `theme` attribute on the URL. |
33+
| `url` | `/wp-admin/` | Load the specified initial WordPress page in this Playground instance. |
34+
| `mode` | `browser-full-screen` | Determines how the WordPress instance is displayed. Either wrapped in a browser UI or full width as a seamless experience. Accepts `browser-full-screen`, or `seamless`. |
35+
| `lazy` | | Defer loading the Playground assets until someone clicks on the "Run" button. Does not accept any values. If `lazy` is added as a URL parameter, loading will be deferred. |
36+
| `login` | `yes` | Log the user in as an admin. Accepts `yes` or `no`. |
37+
| `multisite` | `no` | Enables the WordPress multisite mode. Accepts `yes` or `no`. |
38+
| `import-site` | | Imports site files and database from a ZIP file specified by a URL. |
39+
| `import-wxr` | | Imports site content from a WXR file specified by a URL. It uses the WordPress Importer plugin, so the default admin user must be logged in. |
40+
| `site-slug` | | Selects which site to load from browser storage. |
41+
| `language` | `en_US` | Sets the locale for the WordPress instance. This must be used in combination with `networking=yes` otherwise WordPress won't be able to download translations. |
42+
| `core-pr` | | Installs a specific https://github.com/WordPress/wordpress-develop core PR. Accepts the PR number. For example, `core-pr=6883`. |
43+
| `gutenberg-pr` | | Installs a specific https://github.com/WordPress/gutenberg PR. Accepts the PR number. For example, `gutenberg-pr=65337`. |
44+
| `if-stored-site-missing` | | Indicates how to handle the scenario where the `site-slug` parameter identifies a site that does not exist. Use `if-stored-site-missing=prompt` to indicate that the user should be asked whether they would like to save a new site with the specified `site-slug`. |
4445

4546
For example, the following code embeds a Playground with a preinstalled Gutenberg plugin and opens the post editor:
4647

packages/docs/site/docs/main/quick-start-guide.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ Or this URL to preinstall the `pendant` theme:
4646

4747
https://playground.wordpress.net/?theme=pendant
4848

49+
In case you would like to install multiple themes and plugins, it is possible to repeat the `theme` or `plugin` parameters:
50+
51+
https://playground.wordpress.net/?theme=pendant&theme=acai
52+
4953
You can also mix and match these parameters and even add multiple plugins:
5054

5155
https://playground.wordpress.net/?plugin=coblocks&plugin=friends&theme=pendant

0 commit comments

Comments
 (0)