Introduction To Block Development
summary
Shows how to register a block in PHP with register_block_type and link editor/front-end assets, then how to implement the block in JavaScript with registerBlockType using WP Element (createElement) and props.setAttributes to store editable values. Demonstrates static vs dynamic blocks, server‑side render callbacks for shortcodes, using WP components like TextControl, and scaffolding with WP‑CLI. Example plugin is on GitHub and the code runs in the Gutenberg plugin and WordPress 5.0 editor so the blocks render and edit as expected.
AI-written summary · about
chapters (14)
- 0:00Introduction to talk
- 1:09Speaker introduction
- 3:14What is Gutenberg
- 7:49Editing vs displaying content
- 11:42Static vs dynamic blocks
- 13:05Registering block types
- 16:17JavaScript register block type
- 19:49WP Element createElement
- 23:01Creating a basic block
- 24:07Block attributes
- 27:44WP Components
- 30:12Handling attribute changes
- 31:40Next steps for learning
- 33:26Q&A
