Using Core Data and Sharing Context across WordPress Blocks

Published: 15 February 2024
on channel: Brian Coords - WP Dev
1,533
64

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: https://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


Watch video Using Core Data and Sharing Context across WordPress Blocks online without registration, duration hours minute second in high quality. This video was added by user Brian Coords - WP Dev 15 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,53 once and liked it 6 people.