diff --git a/wp-includes/blocks.php b/wp-includes/blocks.php index 02114cf4cc..31baf119ff 100644 --- a/wp-includes/blocks.php +++ b/wp-includes/blocks.php @@ -749,10 +749,10 @@ function get_dynamic_block_names() { * @return array Associative array of `$block_type_name => $position` pairs. */ function get_hooked_blocks( $name, $relative_position = '' ) { - $block_types = WP_Block_Type_Registry::get_instance()->get_all_registered(); + $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' ) || ! is_array( $block_type->block_hooks ) ) { + if ( ! ( $block_type instanceof WP_Block_Type ) || ! is_array( $block_type->block_hooks ) ) { continue; } foreach ( $block_type->block_hooks as $anchor_block_type => $position ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 7303e9cf58..34dc5d625a 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.4-alpha-56676'; +$wp_version = '6.4-alpha-56677'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.