Skip to content

Commit

Permalink
Block bindings: Remove not needed breaks in `gutenberg_block_bindings…
Browse files Browse the repository at this point in the history
…_replace_html` (WordPress#61660)

* Remove not needed breaks, add return type

* Rephrase copilot description

Co-authored-by: cbravobernal <[email protected]>
Co-authored-by: dmsnell <[email protected]>
  • Loading branch information
3 people authored May 14, 2024
1 parent 23efd8d commit b819a5f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/compat/wordpress-6.5/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,10 @@ function gutenberg_block_bindings_replace_html( $block_content, $block_name, str
}
$amended_content->set_attribute( $block_type->attributes[ $attribute_name ]['attribute'], $source_value );
return $amended_content->get_updated_html();
break;

default:
return $block_content;
break;
}
return;
}

/**
Expand All @@ -114,6 +111,7 @@ function gutenberg_block_bindings_replace_html( $block_content, $block_name, str
* @param string $block_content Block Content.
* @param array $parsed_block The full block, including name and attributes.
* @param WP_Block $block_instance The block instance.
* @return string Block content with the bind applied.
*/
function gutenberg_process_block_bindings( $block_content, $parsed_block, $block_instance ) {
$supported_block_attrs = array(
Expand Down

0 comments on commit b819a5f

Please sign in to comment.