mirror of
https://gh.wpcy.net/https://github.com/wp-cli/handbook.git
synced 2026-05-04 13:28:43 +08:00
20 lines
649 B
Markdown
20 lines
649 B
Markdown
# wp scaffold
|
|
|
|
Generates code for post types, taxonomies, plugins, child themes, etc.
|
|
|
|
### EXAMPLES
|
|
|
|
# Generate a new plugin with unit tests
|
|
$ wp scaffold plugin sample-plugin
|
|
Success: Created plugin files.
|
|
Success: Created test files.
|
|
|
|
# Generate theme based on _s
|
|
$ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe"
|
|
Success: Created theme 'Sample Theme'.
|
|
|
|
# Generate code for post type registration in given theme
|
|
$ wp scaffold post-type movie --label=Movie --theme=simple-life
|
|
Success: Created /var/www/example.com/public_html/wp-content/themes/simple-life/post-types/movie.php
|
|
|
|
|