Skip to content

Instantly share code, notes, and snippets.

@seemly
Created February 8, 2024 16:13
Show Gist options
  • Save seemly/5eda8d7d232c27f118d4478bb97fdd02 to your computer and use it in GitHub Desktop.
Save seemly/5eda8d7d232c27f118d4478bb97fdd02 to your computer and use it in GitHub Desktop.
List all registered WordPress Gutenberg Blocks. Paste this snippet in Chrome Dev Tools Console while in the Gutenberg editor view.
let types = wp.blocks.getBlockTypes();
// filter to just the core blocks
let core_blocks = types.filter(
type => type.name.startsWith('core/')
);
// grab just the names
let block_names = types.map(type => type.name);
// display in the console
console.log(block_names);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment