Setting the file. One moment.
Skill 06 · Wp Block Development
Subchapter 6.2
references/block-json.mdMarkdown2 KBView on GitHub
block.json (metadata) guidanceUse this file when you’re editing block.json fields or choosing between script/styles fields.
name as stable API (renaming breaks existing content).deprecated version.WordPress 6.9+ requires apiVersion 3. The block.json schema now only validates blocks with apiVersion: 3. Older versions (1 or 2) trigger console warnings when SCRIPT_DEBUG is enabled.
Why apiVersion 3 matters:
Migration checklist:
apiVersion to 3 in block.json.$schema to improve editor tooling and validation.References:
This is not a full schema; it’s a “what matters in practice” list:
editorScript / editorStyle: editor-only assets.script / style: shared assets.viewScript / viewStyle: frontend view assets.viewScriptModule: module-based frontend scripts (newer WP).render: points to a PHP render file for dynamic blocks (newer WP).