Created
February 8, 2024 16:13
-
-
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.
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
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