Skip to content

Commit

Permalink
move default redering mode setting to block_editor_settings_all hook …
Browse files Browse the repository at this point in the history
…in PHP to allow customizing it
  • Loading branch information
fabiankaegy committed May 22, 2024
1 parent f937edd commit 9ef296a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
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',
};

0 comments on commit 9ef296a

Please sign in to comment.