Skip to content

Instantly share code, notes, and snippets.

@ndiego
Created March 25, 2024 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndiego/c5e63c7c8db1cfc5f1cfba89b6a77240 to your computer and use it in GitHub Desktop.
Save ndiego/c5e63c7c8db1cfc5f1cfba89b6a77240 to your computer and use it in GitHub Desktop.
Block Hooks API - Examples 2 and 4
{
"landingPage": "/wp-admin/site-editor.php",
"preferredVersions": {
"php": "8.0",
"wp": "nightly"
},
"features": {
"networking": true
},
"steps": [
{
"step": "login"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "https://raw.githubusercontent.com/WordPress/block-development-examples/deploy/zips/copyright-date-block-09aac3.zip"
},
"options": {
"activate": true
}
},
{
"step": "mkdir",
"path": "/wordpress/wp-content/plugins/block-hooks-demo"
},
{
"step": "writeFile",
"path": "/wordpress/wp-content/plugins/block-hooks-demo/block-hooks-demo.php",
"data": {
"resource": "url",
"url": "https://gist.githubusercontent.com/ndiego/456b74b243d86c97cda89264c68cbdee/raw/c4a9167560adad57724446aad1c4a256825f7e29/block-hooks-demo.php"
}
},
{
"step": "activatePlugin",
"pluginName": "Block Hooks Demo",
"pluginPath": "/wordpress/wp-content/plugins/block-hooks-demo"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment