Skip to content

Instantly share code, notes, and snippets.

@kreamweb
Created January 25, 2022 13:55
Show Gist options
  • Save kreamweb/1d7af747bfacfb5f4cd7d45f813dc4bd to your computer and use it in GitHub Desktop.
Save kreamweb/1d7af747bfacfb5f4cd7d45f813dc4bd to your computer and use it in GitHub Desktop.
wp.domReady(() => {
find blocks styles
wp.blocks.getBlockTypes().forEach((block) => {
console.log(block);
if (_.isArray(block['styles'])) {
console.log(block.name, _.pluck(block['styles'], 'name'));
}
});
wp.blocks.unregisterBlockStyle('core/image', 'default');
wp.blocks.unregisterBlockStyle('core/image', 'rounded');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment