Skip to content
Merged
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
10 changes: 10 additions & 0 deletions includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,16 @@ function acf_validate_block_type( $block ) {
$block['supports']['jsx'] = $block['supports']['__experimental_jsx'];
}

// Normalize block 'parent' setting.
if ( array_key_exists( 'parent', $block ) ) {
// As of WP 6.8, parent must be an array.
if ( null === $block['parent'] ) {
unset( $block['parent'] );
} elseif ( is_string( $block['parent'] ) ) {
$block['parent'] = array( $block['parent'] );
}
}

// Return block.
return $block;
}
Expand Down
Loading