-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Add allowedBlocks field to block.json to specify allowed children #58262
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
Changes from 12 commits
2c92e1b
11f79fb
e71df6c
b86a37f
265ffe8
764862e
198bc74
1318e9f
80ef433
58b2b0b
f2e656a
b48d66e
9a46926
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -73,6 +73,7 @@ function gutenberg_add_hooked_blocks( $settings, $metadata ) { | |
| 'keywords' => 'keywords', | ||
| 'example' => 'example', | ||
| 'variations' => 'variations', | ||
| 'allowed_blocks' => 'allowedBlocks', | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ockham I added the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's fine to add here. This is the compatibility layer that implements the Block Hooks "shim" for when the GB plugin runs on WP < 6.4; we're adding the Since we're now also adding the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Once we have the WordPress Core part as outlined in #58262 (comment), then it definitely might become an issue when support for WordPress 6.3 in the Gutenberg plugin drops and this polyfill is no longer there.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nik is right. PHP code should be moved to a target WP version compat directory to avoid missing the backport.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here I modified I'll need to add a separate WordPress 6.5 back compat code in order to support
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @gziolo @ockham https://core.trac.wordpress.org/ticket/60403 and WordPress/wordpress-develop#5988 should be all we need in Core to support
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Excellent, I’ll take it from here and commit tomorrow unless Bernie is faster. Thank you so much @jsnajdr. Stellar job! |
||
| ); | ||
| // Add `block_hooks` to the list of fields to pick. | ||
| $fields_to_pick['block_hooks'] = 'blockHooks'; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.