-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/Guides: WordPress Playground for theme developers #1732
Changes from 1 commit
be65fc9
9aef47a
af20b4a
cd40e73
a6599e3
eb220e1
74e55fa
8dc1de2
c1c2714
b701218
97c9089
4a4041f
7fb8d82
5137274
db85ad7
299d662
190c209
d4dfcb0
4b06bbb
305b75c
b62430d
71aee09
53255a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,11 +93,11 @@ Some useful tools and resources provided by the Playground project to work with | |
|
||
Through properties and [`steps`](/blueprints/steps) in the blueprint, you can configure the initial setup of your theme in the Playground instance. | ||
|
||
### Importing content for your demo | ||
### Providing content for your demo | ||
|
||
One of the things you may want to do to provide a good demo of your theme via Playground is to load default content to better highlight the features of your theme. This default content may include images or other assets. | ||
|
||
There are several blueprint steps and strategies you can use to import content in the theme you want to display in the Playground instance: | ||
There are several blueprint steps and strategies you can use to import content (or generate it) in the theme you want to display in the Playground instance: | ||
|
||
#### `importWxr` | ||
|
||
|
@@ -198,6 +198,25 @@ With the [`importThemeStarterContent` step](/blueprints/steps#importThemeStarter | |
|
||
You can also publish the starter content of a theme when installing it with the [`installTheme` step](/blueprints/steps#installTheme) by setting to `true` its `importStarterContent` option. | ||
|
||
#### `wp-cli` | ||
|
||
Another way of generating content for your theme is via the `wp-cli` step that allows you to run [WP-CLI commands](https://developer.wordpress.org/cli/commands/) such as [`wp post generate`](https://developer.wordpress.org/cli/commands/post/generate/): | ||
|
||
```json | ||
{ | ||
"landingPage": "/wp-admin/edit.php", | ||
"login": true, | ||
"steps": [ | ||
{ | ||
"step": "wp-cli", | ||
"command": "wp post generate --count=20 --post_type=post --post_date=1999-01-04" | ||
} | ||
] | ||
} | ||
``` | ||
|
||
[<kbd> Run Blueprint </kbd>](https://playground.wordpress.net/builder/builder.html#{%22landingPage%22:%22/wp-admin/edit.php%22,%22login%22:true,%22steps%22:[{%22step%22:%22wp-cli%22,%22command%22:%22wp%20post%20generate%20--count=20%20--post_type=post%20--post_date=1999-01-04%22}]}) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could also link to the Blueprint Gallery entry of https://github.com/WordPress/blueprints/tree/trunk/blueprints/wpcli-post-with-image There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a tip referencing that example |
||
### Other Settings | ||
|
||
#### `resetData` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first sentence seems a bit long. See if this tightens it up a bit.
"To provide a good demo of your theme via Playground, you may want to load it with default content that highlights the features of your theme. "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion!
I have extracted the whole "Providing content for your demo" section into a new guide (see #1747) to reference this content from both the "Playground for theme developers" and "Playground for plugin developers" guides.
I have updated this PR with your suggested shorter version in the info callout referencing the "Providing content for your demo" guide