Created
October 7, 2022 17:30
-
-
Save chuckreynolds/5294247f4770cbe888f4a4bbe5239057 to your computer and use it in GitHub Desktop.
WordPress Remove Block Suggestions when viewing the Block Directory in WP Admin.
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
// Remove Block Suggestions in wp-admin Block Directory | |
function chuckdev_remove_block_directory() { | |
wp_add_inline_script( | |
'wp-block-editor', | |
"wp.domReady( () => wp.plugins.unregisterPlugin( 'block-directory' ) )" | |
); | |
} | |
add_action( 'admin_enqueue_scripts', 'chuckdev_remove_block_directory' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment