Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Code snippet to extend Category Block in WP Editor
// svg code
import lancpaIcon from './lancpaIcon';
// alter the icon slot
wp.blocks.updateCategory( 'wclancpa-2019', {
icon: lancpaIcon
} );
Copy link

pbrocks commented Apr 27, 2019

This snippet works in conjunction with another snippet to extend the existing categroy block in the new 5.0 WordPress editor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment