Created
July 28, 2022 11:27
-
-
Save vlepeule/46a2633626c3c342a6b6418172879eaa to your computer and use it in GitHub Desktop.
Auto disable gutenberg fullscreen mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('enqueue_block_editor_assets', function(){ | |
return is_admin() ? wp_add_inline_script('wp-blocks', "window.onload = function(event) { wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) && wp.data.dispatch( 'core/edit-post' ).toggleFeature( 'fullscreenMode' ); };") : null; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment