Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-block-list.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function offsetExists( $offset ) {
public function offsetGet( $offset ) {
$block = $this->blocks[ $offset ];

if ( isset( $block ) && is_array( $block ) ) {
if ( isset( $block ) && ( is_array( $block ) || $block instanceof WP_Parsed_Block ) ) {
$block = new WP_Block( $block, $this->available_context, $this->registry );

$this->blocks[ $offset ] = $block;
Expand Down
Loading