Skip to content

Instantly share code, notes, and snippets.

@pbrocks
Created April 27, 2019 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbrocks/eaf316bac95ae439f549b921ae4abc53 to your computer and use it in GitHub Desktop.
Save pbrocks/eaf316bac95ae439f549b921ae4abc53 to your computer and use it in GitHub Desktop.
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
} );
@pbrocks
Copy link
Author

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