wp-block-registration-and-assets
Installation
SKILL.md
WordPress Block Registration and Assets
Treat block.json as the shared server/editor contract. Register from metadata,
let WordPress resolve generated asset files and supports, and keep the saved
markup compatible with the block's current and deprecated versions.
Choose the registration model
| Need | Model |
|---|---|
| Normal editable block with custom editor UI | block.json plus JavaScript registration/build |
| Dynamic block with custom editor UI | metadata plus render/render_callback |
| Simple server-rendered fields, no custom editor JS | PHP supports.autoRegister on WordPress 7.0+ |
| Fixed composition of existing blocks | pattern or block variation |
| Dynamic value in a supported existing attribute | Block Bindings source |