Skip to content

Commit

Permalink
Editor: Add an extra check before enabling the new default rendering …
Browse files Browse the repository at this point in the history
…mode for Pages (#69209)

* Editor: Add an extra check before enabling the new default rendering mode for Pages
* Add backport changelog entry

Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: swissspidy <[email protected]>
Co-authored-by: fabiankaegy <[email protected]>
  • Loading branch information
4 people authored Feb 17, 2025
1 parent 31d48d7 commit 590af0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions backport-changelog/6.8/8123.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ https://github.com/WordPress/wordpress-develop/pull/8123
* https://github.com/WordPress/gutenberg/pull/68549
* https://github.com/WordPress/gutenberg/pull/68745
* https://github.com/WordPress/gutenberg/pull/69160
* https://github.com/WordPress/gutenberg/pull/69209
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.8/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function gutenberg_update_page_editor_support() {
return;
}

if ( wp_is_block_theme() ) {
if ( wp_is_block_theme() && current_theme_supports( 'block-templates' ) ) {
add_post_type_support( 'page', 'editor', array( 'default-mode' => 'template-locked' ) );
}
}
Expand Down

0 comments on commit 590af0a

Please sign in to comment.