Mga Shorthand
Maaari mong tukuyin ang ilang steps
gamit ang shorthand
syntax. Ang mga sumusunod na steps
ay kasalukuyang sinusuportahan:
login
Gamitin ang
"login": true,
O
{
"step": "login",
"username": "admin",
"password": "password"
}
plugins
(pinapalitan ang installPlugin
step)
Gamitin ang
"plugins": [
"hello-dolly",
"https://raw.githubusercontent.com/adamziel/blueprints/trunk/docs/assets/hello-from-the-dashboard.zip"
]
O
[
{
"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
Gamitin ang
"siteOptions": {
"blogname": "My first Blueprint"
}
O
"step": "setSiteOptions",
"options": {
"blogname": "My first Blueprint"
}
defineWpConfigConsts
(constants
lamang)
Gamitin ang
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DISABLE_FATAL_ERROR_HANDLER": true,
"WP_DEBUG": true,
"WP_DEBUG_DISPLAY": true
}
}
O
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DISABLE_FATAL_ERROR_HANDLER": true
}
},
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DEBUG": true
}
},
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DEBUG_DISPLAY": true
}
}
Ang shorthand
syntax at ang step
syntax ay tumutugma sa isa't isa. Ang bawat step
na tinukoy gamit ang shorthand
syntax ay idinagdag sa tuktok ng steps
array sa arbitrary order.
info
Alin ang dapat mong piliin?
- Gamitin ang
shorthands
kapag ang kakulangan ang iyong pangunahing alalahanin.
- Gamitin ang explicit
steps
kapag kailangan mo ng mas maraming kontrol sa execution order.