In this video, originally streamed on March 23, 2023, we did the inaugural Bring Me Your Issues stream where we take viewer-submitted issues and see if we can get them working.
0:00 Intro.
00:56 Reviewing the submitted issues.
03:15 Scaffold the plugin for our blocks with the @wordpress/create-block package.
05:17 Building a block to display an Edit Post link for logged-in users.
17:11 Adding edit_post_link in the render.php file to output the link.
22:00 Updating the Edit component to match the output of the front end.
26:24 Adding some checks to only show the link to users with the correct level of access.
44:59 Selecting a new issue to work on.
45:34 FormTokenField cannot have identical names in the value discussion
1:09:21 Adding a new post-picker block to our existing plugin with the @wordpress/create-block package
1:10:08 Why InnerBlocks?
1:10:53 Creating a post-placeholder block and creating the parent/child relationship with the post-picker block.
1:12:47 Building out the post-picker block.
1:15:20 Building out the post-placeholder block.
1:20:45 Dynamically creating and inserting a block into the post-picker block.
1:52:15 Discussion around array destructuring in JavaScript with pseudo useState example.
1:59:16 Getting the post-picker block to save correctly.
2:02:10 Working on the front-end output of both blocks.
2:17:17 Showing the post title in the block editor.
Resources:
Twitch Repo: https://kdta.io/gzOIA
Issue LIst: https://github.com/ryanwelcher/twitch...
@wordpress/create-block package: https://developer.wordpress.org/block...
edit_post_link: https://developer.wordpress.org/refer...
InnerBlocks: https://github.com/WordPress/gutenber...
createBlock: https://developer.wordpress.org/block...
insertBlocks: https://developer.wordpress.org/block...
useDispatch: https://developer.wordpress.org/block...
useSelect: https://developer.wordpress.org/block...
Array destructuring: https://developer.mozilla.org/en-US/d...
#wordpress #gutenberg #wordpresstutorial #innerblocks #wordpressplugin