Created
July 21, 2021 00:10
-
-
Save psorensen/e0015e4ffce870c63399c2a3ab5a6012 to your computer and use it in GitHub Desktop.
Get all block names of given namespace
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
wp.blocks.getBlockTypes().filter((block) => { return block.name.indexOf('jetpack') !== -1 }).map(o => o['name']) | |
// credit https://stackoverflow.com/a/37092497 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment