-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support new block collection functionality in WordPress 5.4 #1367
Conversation
You could look into conditionally registering into collection vs category depending on feature availability. Example here: |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
@jrtashjian Ready for review. |
You got highlighted! ;-) https://make.wordpress.org/core/2020/02/27/block-collections/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
WordPress 5.4 adds support for block collections; i.e. groups of blocks from a plugin. This allows for plugins like ours to add our blocks in the proper categories within the block library - while also still providing a section of the library just for our blocks.
The one addition I added was renaming the "CoBlocks Galleries" category to simply "Galleries".
There's a PR to simplify the inserter categories in Gutenberg (WordPress/gutenberg#19279) , which when implemented we could simply assign our gallery blocks within the upcoming "Media" category.
Screenshots
Types of changes
New feature (non-breaking change which adds functionality). Although this change should be merged when we're ready for WordPress 5.4. < WP 5.4 will work fine, but
registerBlockCollection
is not available - so while the "CoBlocks" category is missing, the blocks are found within their respective new categories.Checklist: