Created
September 21, 2020 12:57
-
-
Save erropix/9335f2b75ce05fb07b0eb07295d3e298 to your computer and use it in GitHub Desktop.
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
/* | |
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