Last active
September 7, 2022 12:49
-
-
Save vburlak/9928afdb11d4584a3a620ecbeb67fa0d to your computer and use it in GitHub Desktop.
Revisions
-
vburlak renamed this gist
Sep 7, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vburlak created this gist
Sep 7, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ // grab all block types const types = wp.blocks.getBlockTypes(); // filter to just the core blocks const core_blocks = types.filter( type => type.name.startsWith( 'core/' ) ); // grab just the names const block_names = core_blocks.map( type => type.name ); // display in the console console.log( block_names );