From 9ef296a5165320e03735dc2b659b4ce7462e883a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Wed, 22 May 2024 08:28:53 +0200 Subject: [PATCH 1/3] move default redering mode setting to block_editor_settings_all hook in PHP to allow customizing it --- lib/block-editor-settings.php | 2 ++ packages/edit-post/src/editor.js | 1 - packages/editor/src/store/defaults.js | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/block-editor-settings.php b/lib/block-editor-settings.php index 53668e114e04cb..d98f5d0a94dbbf 100644 --- a/lib/block-editor-settings.php +++ b/lib/block-editor-settings.php @@ -146,6 +146,8 @@ function gutenberg_get_block_editor_settings( $settings ) { ); } + $settings['defaultRenderingMode'] = 'post-only'; + return $settings; } add_filter( 'block_editor_settings_all', 'gutenberg_get_block_editor_settings', 0 ); diff --git a/packages/edit-post/src/editor.js b/packages/edit-post/src/editor.js index 378265c1927788..f31fbed87cebde 100644 --- a/packages/edit-post/src/editor.js +++ b/packages/edit-post/src/editor.js @@ -78,7 +78,6 @@ function Editor( { ...settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord, - defaultRenderingMode: 'post-only', } ), [ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ] ); diff --git a/packages/editor/src/store/defaults.js b/packages/editor/src/store/defaults.js index e4f86b3a7dfb21..999f16e2d39bbe 100644 --- a/packages/editor/src/store/defaults.js +++ b/packages/editor/src/store/defaults.js @@ -29,5 +29,4 @@ export const EDITOR_SETTINGS_DEFAULTS = { codeEditingEnabled: true, fontLibraryEnabled: true, enableCustomFields: undefined, - defaultRenderingMode: 'post-only', }; From ee6c64693a6f91213c83888b59fa5b984ff654bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Wed, 22 May 2024 08:53:51 +0200 Subject: [PATCH 2/3] add core backport file --- 6.6/6601.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 6.6/6601.md diff --git a/6.6/6601.md b/6.6/6601.md new file mode 100644 index 00000000000000..43847eb2d1f370 --- /dev/null +++ b/6.6/6601.md @@ -0,0 +1,3 @@ +https://github.com/WordPress/wordpress-develop/pull/6601 + +* https://github.com/WordPress/gutenberg/pull/61844 From 8e3524805fe1c20b3e8df9470f4c4694a823828d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Wed, 22 May 2024 08:55:08 +0200 Subject: [PATCH 3/3] fix move backport file --- {6.6 => backport-changelog/6.6}/6601.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {6.6 => backport-changelog/6.6}/6601.md (100%) diff --git a/6.6/6601.md b/backport-changelog/6.6/6601.md similarity index 100% rename from 6.6/6601.md rename to backport-changelog/6.6/6601.md