Skip to content

Commit 6a488fe

Browse files
committed
Move down to make order a bit easier to grasp
1 parent 3363b02 commit 6a488fe

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/compat/wordpress-6.9/block-bindings.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,6 @@ function gutenberg_block_bindings_render_block( $block_content, $block, $instanc
4242
return $block_content;
4343
}
4444

45-
/*
46-
* If we're dealing with the Button block, we remove the bindings metadata
47-
* in order to avoid having it reprocessed, which would lead to Core
48-
* capitalizing the wrapper tag (e.g. <DIV>).
49-
*/
50-
if ( 'core/button' === $instance->name ) {
51-
unset( $instance->parsed_block['attrs']['metadata']['bindings'] );
52-
}
53-
5445
/*
5546
* Merge the computed attributes with the original attributes.
5647
*
@@ -64,6 +55,15 @@ function gutenberg_block_bindings_render_block( $block_content, $block, $instanc
6455
*/
6556
$instance->attributes = array_merge( $instance->attributes, $computed_attributes );
6657

58+
/*
59+
* If we're dealing with the Button block, we remove the bindings metadata
60+
* in order to avoid having it reprocessed, which would lead to Core
61+
* capitalizing the wrapper tag (e.g. <DIV>).
62+
*/
63+
if ( 'core/button' === $instance->name ) {
64+
unset( $instance->parsed_block['attrs']['metadata']['bindings'] );
65+
}
66+
6767
/**
6868
* This filter (`gutenberg_block_bindings_render_block`) is called from `WP_Block::render()`.
6969
* To avoid infinite recursion, we set a flag that this filter checks when invoked which tells

0 commit comments

Comments
 (0)