Skip to content

Commit

Permalink
Fix layout when post content is root block
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Sep 15, 2023
1 parent e86aae1 commit 089d6d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.3/block-editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function gutenberg_get_block_editor_settings_experimental( $settings ) {
$template_blocks = parse_blocks( $current_template[0]->content );
$post_content_block = gutenberg_find_first_block( 'core/post-content', $template_blocks );

if ( ! empty( $post_content_block['attrs'] ) ) {
if ( is_array( $post_content_block['attrs'] ) || is_object( $post_content_block['attrs'] ) ) {
$settings['postContentAttributes'] = $post_content_block['attrs'];
}
}
Expand Down

0 comments on commit 089d6d7

Please sign in to comment.