Skip to content

Commit

Permalink
Update Core code to avoid the nesting problem
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsnell committed Jun 8, 2024
1 parent fb3c62d commit 9f4b52d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/wp-includes/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,8 @@ function _inject_theme_attribute_in_template_part_block( &$block ) {
'core/template-part' === $block['blockName'] &&
! isset( $block['attrs']['theme'] )
) {
$block['attrs']['theme'] = get_stylesheet();
$attrs = $block['attrs'];
$attrs['theme'] = get_stylesheet();
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/blocks/navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,8 @@ function block_core_navigation_typographic_presets_backcompatibility( $parsed_bl
foreach ( $attribute_to_prefix_map as $style_attribute => $prefix ) {
if ( ! empty( $parsed_block['attrs']['style']['typography'][ $style_attribute ] ) ) {
$prefix_len = strlen( $prefix );
$attribute_value = &$parsed_block['attrs']['style']['typography'][ $style_attribute ];
$attrs = $parsed_block['attrs'];
$attribute_value = &$attrs['style']['typography'][ $style_attribute ];
if ( 0 === strncmp( $attribute_value, $prefix, $prefix_len ) ) {
$attribute_value = substr( $attribute_value, $prefix_len );
}
Expand Down

0 comments on commit 9f4b52d

Please sign in to comment.