Skip to content

Instantly share code, notes, and snippets.

@erropix
Created September 21, 2020 12:57
Show Gist options
  • Save erropix/9335f2b75ce05fb07b0eb07295d3e298 to your computer and use it in GitHub Desktop.
Save erropix/9335f2b75ce05fb07b0eb07295d3e298 to your computer and use it in GitHub Desktop.
/*
Title: Disable Gutenberg fullscreen mode
Type: JavaScript > Custom Code
Location: Custom Hooks
Hook name: enqueue_block_editor_assets
Priority: 10
*/
window.addEventListener('load', function() {
if (wp.data.select('core/edit-post').isFeatureActive('fullscreenMode')) {
wp.data.dispatch('core/edit-post').toggleFeature('fullscreenMode');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment