Created
October 4, 2023 05:02
-
-
Save stokesman/89b9066ec75f4ea74a6fadf43cf655a3 to your computer and use it in GitHub Desktop.
Plugin to workaround gutenberg issue #53477
This file contains hidden or 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
<?php | |
/** | |
* Plugin Name: Classic Block Resticky | |
* Description: Ensures the classic block’s formatting toolbar is sticky when custom fields are present. | |
*/ | |
add_action( 'admin_footer', function() { | |
// Bails unless on a block editor screen | |
if ( ! get_current_screen()->is_block_editor() ) return; | |
?> | |
<style> | |
.has-metaboxes .edit-post-visual-editor { overflow: unset; } | |
/* Prevents overlap of formatting toolbar and the block toolbar */ | |
.has-metaboxes .is-selected .block-library-classic__toolbar { top: 59px; } | |
</style> | |
<?php | |
}, 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment