メインコンテンツへスキップ

ショートハンド

shorthand 構文を使用して、いくつかの steps を指定できます。現在、以下の steps がサポートされています。

login

使い方

	"login": true,

または

{
"step": "login",
"username": "admin",
"password": "password"
}

plugins

(installPlugin ステップを置き換えます)

使い方

	"plugins": [
"hello-dolly",
"https://raw.githubusercontent.com/adamziel/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip"
]

または

[
{
"step": "installPlugin",
"pluginData": {
"resource": "wordpress.org/plugins",
"slug": "hello-dolly"
}
},
{
"step": "installPlugin",
"pluginData": {
"resource": "url",
"url": "https://raw.githubusercontent.com/adamziel/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip"
}
}
]

siteOptions

使い方

	"siteOptions": {
"blogname": "My first Blueprint"
}

または

	"step": "setSiteOptions",
"options": {
"blogname": "My first Blueprint"
}

defineWpConfigConsts

constantsのみ)

使い方

{
"step": "defineWpConfigConsts",
"consts": {
"WP_DISABLE_FATAL_ERROR_HANDLER": true,
"WP_DEBUG": true,
"WP_DEBUG_DISPLAY": true
}
}

または

	{
"step": "defineWpConfigConsts",
"consts": {
"WP_DISABLE_FATAL_ERROR_HANDLER": true
}
},
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DEBUG": true
}
},
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DEBUG_DISPLAY": true
}
}

shorthand 構文と step 構文は互いに対応しています。shorthand 構文で指定されたすべての step は、任意の順序で steps 配列の先頭に追加されます。

どちらを選ぶべきですか?
  • 簡潔さ を重視する場合は、shorthands を使用します。
  • 実行順序 をより細かく制御する必要がある場合は、明示的な steps を使用します。