此命令是 wp scaffold underscores 的别名,用于快速生成基于 Underscores 起始主题的 WordPress 主题骨架。
适合开发者快速搭建主题基础结构,节省手动创建文件的时间。
| 参数 | 说明 |
|---|---|
<slug> |
新主题的别名,用于函数前缀。 |
[--activate] |
激活新下载的主题。 |
[--enable-network] |
为整个网络启用新下载的主题。 |
[--theme_name=<title>] |
要放在 style.css 的 Theme Name: 头中的内容。 |
[--author=<full-name>] |
要放在 style.css 的 Author: 头中的内容。 |
[--author_uri=<uri>] |
要放在 style.css 的 Author URI: 头中的内容。 |
[--sassify] |
包含 SASS 格式的样式表。 |
[--woocommerce] |
包含 WooCommerce 样板文件。 |
[--force] |
覆盖已存在的文件。 |
$ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe"