用于在WordPress多站点网络中启用主题,使其可在站点仪表板中激活。
适合在多站点环境下管理主题的启用状态,支持网络级启用和站点级激活。
| 参数 | 说明 |
|---|---|
<theme> |
要启用的主题。 |
[--network] |
如果设置,主题将在整个网络中启用。 |
[--activate] |
如果设置,主题将在当前站点激活。注意:network标志对此无影响。 |
$ wp theme enable twentysixteen
Success: Enabled the 'Twenty Sixteen' theme.
$ wp theme enable twentysixteen --network
Success: Network enabled the 'Twenty Sixteen' theme.
$ wp theme enable twentysixteen --activate
Success: Enabled the 'Twenty Sixteen' theme.
Success: Switched to 'Twenty Sixteen' theme.