Рет қаралды 1,249
Extending WordPress blocks to talk to each other means using the WordPress Core Data packages, and hidden block features like "context". With tools like useSelect and useDispatch, we'll add a button to a core block that inserts new blocks into it's parent block.
👉 Link to repo: github.com/bacoords/wcphx-202...
Chapters
00:00:00 Intro
00:01:01 Our Block's UI Needs
00:03:07 Our Block Scaffold
00:03:57 The BlockControls Component
00:06:23 InsertBlock and useDispatch
00:12:58 Filtering a Core Block's Attributes
00:14:40 Understanding Context
00:17:05 AddFilter in JavaScript
00:21:11 Modifying a core block's Edit.js
00:24:52 Adding UI a core block's toolbar
00:27:44 Using useSelect to get Block Data
00:34:28 Next Steps