Make WordPress Core


Ignore:
Timestamp:
02/27/2025 11:08:10 PM (21 months ago)
Author:
peterwilsoncc
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post.php

    r59784 r59885  
    6969                )
    7070        );
     71
     72        // Enhance page editor for block themes by rendering template and content blocks.
     73        if ( wp_is_block_theme() && current_theme_supports( 'block-templates' ) ) {
     74                add_post_type_support( 'page', 'editor', array( 'default-mode' => 'template-locked' ) );
     75        }
    7176
    7277        register_post_type(
Note: See TracChangeset for help on using the changeset viewer.