diff --git a/backport-changelog/6.8/8123.md b/backport-changelog/6.8/8123.md index bfb291a55f15e..7955ec7741685 100644 --- a/backport-changelog/6.8/8123.md +++ b/backport-changelog/6.8/8123.md @@ -1,3 +1,4 @@ https://github.com/WordPress/wordpress-develop/pull/8123 * https://github.com/WordPress/gutenberg/pull/68549 +* https://github.com/WordPress/gutenberg/pull/68745 diff --git a/lib/compat/wordpress-6.8/post.php b/lib/compat/wordpress-6.8/post.php index 5032476648899..2477e94f7393c 100644 --- a/lib/compat/wordpress-6.8/post.php +++ b/lib/compat/wordpress-6.8/post.php @@ -17,7 +17,7 @@ function gutenberg_update_page_editor_support( $args ) { if ( false !== $editor_support_key ) { unset( $args['supports'][ $editor_support_key ] ); $args['supports']['editor'] = array( - 'default_mode' => 'template-locked', + 'default-mode' => 'template-locked', ); } diff --git a/packages/editor/src/components/provider/index.js b/packages/editor/src/components/provider/index.js index 81435d966b44e..dfeaf19a5bd21 100644 --- a/packages/editor/src/components/provider/index.js +++ b/packages/editor/src/components/provider/index.js @@ -198,8 +198,8 @@ export const ExperimentalEditorProvider = withRegistryProvider( const _defaultMode = Array.isArray( postTypeSupports?.editor ) ? postTypeSupports.editor.find( - ( features ) => 'default_mode' in features - )?.default_mode + ( features ) => 'default-mode' in features + )?.[ 'default-mode' ] : undefined; const hasDefaultMode = RENDERING_MODES.includes( _defaultMode );