Skip to content

Commit

Permalink
Make unit tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Sep 21, 2023
1 parent 8ee21bb commit bd1c57b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,9 @@ function get_hooked_blocks( $name ) {
$block_types = WP_Block_Type_Registry::get_instance()->get_all_registered();
$hooked_blocks = array();
foreach ( $block_types as $block_type ) {
if ( ! property_exists( $block_type, 'block_hooks' ) ) {
continue;
}
foreach ( $block_type->block_hooks as $anchor_block_type => $relative_position ) {
if ( $anchor_block_type === $name ) {
$hooked_blocks[ $block_type->name ] = $relative_position;
Expand Down

0 comments on commit bd1c57b

Please sign in to comment.