equal
deleted
inserted
replaced
56 } |
56 } |
57 |
57 |
58 $pattern = $registry->get_registered( $slug ); |
58 $pattern = $registry->get_registered( $slug ); |
59 $content = $pattern['content']; |
59 $content = $pattern['content']; |
60 |
60 |
61 // Backward compatibility for handling Block Hooks and injecting the theme attribute in the Gutenberg plugin. |
|
62 // This can be removed when the minimum supported WordPress is >= 6.4. |
|
63 if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && ! function_exists( 'traverse_and_serialize_blocks' ) ) { |
|
64 $blocks = parse_blocks( $content ); |
|
65 $content = gutenberg_serialize_blocks( $blocks ); |
|
66 } |
|
67 |
|
68 $seen_refs[ $attributes['slug'] ] = true; |
61 $seen_refs[ $attributes['slug'] ] = true; |
69 |
62 |
70 $content = do_blocks( $content ); |
63 $content = do_blocks( $content ); |
71 |
64 |
72 global $wp_embed; |
65 global $wp_embed; |