From 3bad234b73ae324ff95a8c1d229e4e112d495fa0 Mon Sep 17 00:00:00 2001 From: Mamaduka Date: Tue, 25 Mar 2025 06:45:28 +0000 Subject: [PATCH] Editor: Revert the new default rendering mode for Pages. This fully reverts changes from #61811 while leaving infrastructure in place for consumers to enable different default rendering modes for their post types. Props mamaduka, joemcgill, mtdkei. Fixes #63139. Built from https://develop.svn.wordpress.org/trunk@60076 git-svn-id: http://core.svn.wordpress.org/trunk@59412 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 1 - wp-includes/post.php | 11 ----------- wp-includes/version.php | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 96b3687433..936bbb6a86 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -565,7 +565,6 @@ add_action( 'transition_post_status', '__clear_multi_author_cache' ); // Post. add_action( 'init', 'create_initial_post_types', 0 ); // Highest priority. -add_action( 'init', 'wp_set_editor_default_mode', 1 ); // Run after registering post types. add_action( 'admin_menu', '_add_post_type_submenus' ); add_action( 'before_delete_post', '_reset_front_page_settings_for_post' ); add_action( 'wp_trash_post', '_reset_front_page_settings_for_post' ); diff --git a/wp-includes/post.php b/wp-includes/post.php index 4db40681bb..58504e140a 100644 --- a/wp-includes/post.php +++ b/wp-includes/post.php @@ -8524,14 +8524,3 @@ function wp_create_initial_post_meta() { ) ); } - -/** - * Sets the default editor mode based on support for block templates. - * - * @since 6.8.0 - */ -function wp_set_editor_default_mode() { - if ( wp_is_block_theme() && current_theme_supports( 'block-templates' ) ) { - add_post_type_support( 'page', 'editor', array( 'default-mode' => 'template-locked' ) ); - } -} diff --git a/wp-includes/version.php b/wp-includes/version.php index 02eeecef2c..4f5e4f8670 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.8-beta3-60075'; +$wp_version = '6.8-beta3-60076'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.