Editor: Set new default rendering mode for Pages.

This update updates the `page` post-type definition and sets `template-locked` as the new default rendering mode for the block editor.

Props mamaduka, wildworks, joemcgill, tyb, swissspidy, audrasjb.
Fixes #61811.

Built from https://develop.svn.wordpress.org/trunk@59885


git-svn-id: http://core.svn.wordpress.org/trunk@59227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2025-02-27 23:10:23 +00:00
parent 33952d5069
commit 0d3573d58b
2 changed files with 6 additions and 1 deletions

View File

@ -69,6 +69,11 @@ function create_initial_post_types() {
)
);
// Enhance page editor for block themes by rendering template and content blocks.
if ( wp_is_block_theme() && current_theme_supports( 'block-templates' ) ) {
add_post_type_support( 'page', 'editor', array( 'default-mode' => 'template-locked' ) );
}
register_post_type(
'attachment',
array(

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.8-alpha-59884';
$wp_version = '6.8-alpha-59885';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.