Skip to content

Commit

Permalink
Fix layout when post content is root block (#54485)
Browse files Browse the repository at this point in the history
* Fix layout when post content is root block

* Change check to isset

* Update lib/compat/wordpress-6.3/block-editor-settings.php

Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com>

---------

Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com>
  • Loading branch information
tellthemachines and andrewserong authored Sep 15, 2023
1 parent e86aae1 commit 72b0a82
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 ( isset( $post_content_block['attrs'] ) ) {
$settings['postContentAttributes'] = $post_content_block['attrs'];
}
}
Expand Down

0 comments on commit 72b0a82

Please sign in to comment.