mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-05 23:27:04 +00:00
Editor: Update WordPress packages for 6.0 Beta 4
Included cherry-picked commits from the Gutenberg plugin that fix bugs discovere after WordPress 6.0 Beta 3. Props zieladam, ndiego, darerodz. See #55567. git-svn-id: https://develop.svn.wordpress.org/trunk@53329 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -25,10 +25,14 @@ function render_block_core_post_comments_form( $attributes, $content, $block ) {
|
||||
|
||||
$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => $classes ) );
|
||||
|
||||
add_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
|
||||
|
||||
ob_start();
|
||||
comment_form( array(), $block->context['postId'] );
|
||||
$form = ob_get_clean();
|
||||
|
||||
remove_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
|
||||
|
||||
// We use the outermost wrapping `<div />` returned by `comment_form()`
|
||||
// which is identified by its default classname `comment-respond` to inject
|
||||
// our wrapper attributes. This way, it is guaranteed that all styling applied
|
||||
@@ -70,4 +74,3 @@ function post_comments_form_block_form_defaults( $fields ) {
|
||||
|
||||
return $fields;
|
||||
}
|
||||
add_filter( 'comment_form_defaults', 'post_comments_form_block_form_defaults' );
|
||||
|
||||
Reference in New Issue
Block a user