Skip to content

Instantly share code, notes, and snippets.

  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
WordPress Remove Block Suggestions when viewing the Block Directory in WP Admin.
// 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