Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move default redering mode setting to block_editor_settings_all hook in PHP to allow customizing it #61844

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backport-changelog/6.6/6601.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/6601

* https://github.com/WordPress/gutenberg/pull/61844
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you ❤️

2 changes: 2 additions & 0 deletions lib/block-editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
1 change: 0 additions & 1 deletion packages/edit-post/src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ function Editor( {
...settings,
onNavigateToEntityRecord,
onNavigateToPreviousEntityRecord,
defaultRenderingMode: 'post-only',
} ),
[ settings, onNavigateToEntityRecord, onNavigateToPreviousEntityRecord ]
);
Expand Down
1 change: 0 additions & 1 deletion packages/editor/src/store/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ export const EDITOR_SETTINGS_DEFAULTS = {
codeEditingEnabled: true,
fontLibraryEnabled: true,
enableCustomFields: undefined,
defaultRenderingMode: 'post-only',
};
Loading