用于生成基于 Underscores(别名 _s)的 WordPress 主题骨架。
适合快速搭建符合 WordPress 编码标准的主题开发起点,可自定义主题名称、作者信息,并支持 SASS 和 WooCommerce 集成。
| 参数 | 说明 |
|---|---|
<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] |
包含 stylesheets as SASS。 |
[--woocommerce] |
包含 WooCommerce boilerplate files。 |
[--force] |
覆盖已存在的文件。 |
$ wp scaffold _s sample-theme --theme_name="Sample Theme" --author="John Doe"