Changeset 56710 for trunk/src/wp-includes/blocks/pattern.php
- Timestamp:
- 09/26/2023 02:20:18 PM (2 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/pattern.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/pattern.php
r56298 r56710 42 42 43 43 $pattern = $registry->get_registered( $slug ); 44 return do_blocks( $pattern['content'] ); 44 $content = $pattern['content']; 45 46 // Backward compatibility for handling Block Hooks and injecting the theme attribute in the Gutenberg plugin. 47 // This can be removed when the minimum supported WordPress is >= 6.4. 48 if ( defined( 'IS_GUTENBERG_PLUGIN' ) && IS_GUTENBERG_PLUGIN && ! function_exists( 'traverse_and_serialize_blocks' ) ) { 49 $content = _inject_theme_attribute_in_block_template_content( $content ); 50 $blocks = parse_blocks( $content ); 51 $content = gutenberg_serialize_blocks( $blocks ); 52 } 53 54 return do_blocks( $content ); 45 55 } 46 56
Note: See TracChangeset
for help on using the changeset viewer.