-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Library: Mark new blocks to be included in WordPress core #40186
Conversation
Would you please walk me through the reasoning here? |
Size Change: +17 B (0%) Total Size: 1.22 MB
ℹ️ View Unchanged
|
* @return void | ||
*/ | ||
function gutenberg_rest_comment_set_children_as_embeddable() { | ||
add_filter( |
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.
@c4rl0sbr4v0 and @DAreRodz - is that still necessary for the Comment Template block?
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.
We need that function in order to show Comment Replies on the editor. Attached a video of what happens if we remove it.
removing_rest_extension.mov
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.
Great, thank you for the confirmation 👍🏻
We don’t want to have the block editor setting fed with every possible global site setting. Discussion settings are used only when the comment-related blocks are inserted in the editor so we could use REST API instead. The challenge is that those settings are available through REST API for the admin users only. That's why we had to go with the fallback through the block editor settings. Besides, those aren't strictly editor settings but site settings. |
Ah alright! And the JS files from the other PR already rely on the __experimental name so there is nothing to change |
What?
Part of #39889.
Blocks to be included in WordPress 6.0 release:
Why?
We want to ship them to WordPress users in the 6.0 major release!
How?
Block definitions were moved to
__experimentalGetCoreBlocks
function from__experimentalRegisterExperimentalCoreBlocks
function.