diff --git a/lib/compat/wordpress-6.6/resolve-patterns.php b/lib/compat/wordpress-6.6/resolve-patterns.php index d09d04b90884af..f9d9cd675987d9 100644 --- a/lib/compat/wordpress-6.6/resolve-patterns.php +++ b/lib/compat/wordpress-6.6/resolve-patterns.php @@ -21,11 +21,11 @@ function gutenberg_replace_pattern_blocks( $blocks, &$inner_content = null ) { continue; } - $registry = WP_Block_Patterns_Registry::get_instance(); - $pattern = $registry->get_registered( $slug ); - $blocks_to_insert = parse_blocks( $pattern['content'] ); + $registry = WP_Block_Patterns_Registry::get_instance(); + $pattern = $registry->get_registered( $slug ); + $blocks_to_insert = parse_blocks( $pattern['content'] ); $seen_refs[ $slug ] = true; - $blocks_to_insert = gutenberg_replace_pattern_blocks( $blocks_to_insert ); + $blocks_to_insert = gutenberg_replace_pattern_blocks( $blocks_to_insert ); unset( $seen_refs[ $slug ] ); array_splice( $blocks, $i, 1, $blocks_to_insert );