Home / Disable Fullscreen Editor
Duplicate Snippet

Embed Snippet on Your Site

Disable Fullscreen Editor

Automatically disable the Gutenberg Fullscreen editor for all users.

300+
Code Preview
php
<?php
add_action(
	'enqueue_block_editor_assets',
	function () {
		$script = "jQuery( window ).load(function() { const isFullscreenMode = wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ); if ( isFullscreenMode ) { wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); } });";
		wp_add_inline_script( 'wp-blocks', $script );
	}
);

Comments

Add a Comment