Skip to content

Commit

Permalink
Pattern: Remove Backward compatibility code for WordPress < 6.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Soean committed Nov 19, 2024
1 parent d478c08 commit cb0a3d9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions packages/block-library/src/pattern/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ function render_block_core_pattern( $attributes ) {
$pattern = $registry->get_registered( $slug );
$content = $pattern['content'];

// Backward compatibility for handling Block Hooks and injecting the theme attribute in the Gutenberg plugin.
// This can be removed when the minimum supported WordPress is >= 6.4.
if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && ! function_exists( 'traverse_and_serialize_blocks' ) ) {
$blocks = parse_blocks( $content );
$content = gutenberg_serialize_blocks( $blocks );
}

$seen_refs[ $attributes['slug'] ] = true;

$content = do_blocks( $content );
Expand Down

0 comments on commit cb0a3d9

Please sign in to comment.