Open the block editor with the admin menu
The block editor stops opening in fullscreen mode, so the WordPress menu stays visible. Anyone who switches fullscreen back on from the editor’s Options menu keeps their choice.
<?php
add_action(
'enqueue_block_editor_assets',
static function () {
// Changes the default only: a choice the user made in the editor still wins.
wp_add_inline_script(
'wp-edit-post',
"window.addEventListener( 'load', function () {
wp.data.dispatch( 'core/preferences' ).setDefaults( 'core/edit-post', { fullscreenMode: false } );
} );"
);
}
);
In these packs
- Posts and the editor: Make the block editor calmer and give pages excerpts, tags and categories.