Instantly share code, notes, and snippets.

Embed
What would you like to do?
// See richardtape.com/?p=348
/**
* Is the passed block name one which supports our custom field?
*
* @param {string} name The name of the block.
*/
function isValidBlockType( name ) {
const validBlockTypes = [
'core/paragraph',
'core/image',
'core/heading',
];
return validBlockTypes.includes( name );
}// end isValidBlockType()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment