Using allowed_block_types_all hook for Jetpack blocks
-
Hi there,
For my use case I am limiting the available blocks in the editor, and for this I am using the allowed_block_types_all hook. What I am not certain of, is whether this can also be used for Jetpack blocks. If so, how do I target the YouTube and Instagram blocks? And if not, what ways does Jetpack have of limiting the available blocks with code?function qx_limit_block_types($allowed_block_types, $block_editor_context) { $allowed_block_types = array( 'core/heading', // Heading block 'core/image', // Image block 'core/list', // List block 'core/paragraph', // Paragraph block 'core/pullquote', // Quote block 'core/button', // Button block 'core/buttons', // Buttons block ); return $allowed_block_types; } add_filter('allowed_block_types_all', 'qx_limit_block_types', 10, 2);
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Using allowed_block_types_all hook for Jetpack blocks’ is closed to new replies.