File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/block-library/src/social-links Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import {
2828 ToolbarItem ,
2929 ToolbarGroup ,
3030} from '@wordpress/components' ;
31+ import { applyFilters } from '@wordpress/hooks' ;
3132import { __ } from '@wordpress/i18n' ;
3233import { check } from '@wordpress/icons' ;
3334
@@ -91,9 +92,15 @@ export function SocialLinksEdit( props ) {
9192 [ `items-justified-${ itemsJustification } ` ] : itemsJustification ,
9293 } ) ;
9394
95+ // Filter to allow additional social link blocks
96+ const FilteredAllowedBlocks = applyFilters (
97+ 'editor.SocialLinks.allowedBlocks' ,
98+ ALLOWED_BLOCKS
99+ ) ;
100+
94101 const blockProps = useBlockProps ( { className } ) ;
95102 const innerBlocksProps = useInnerBlocksProps ( blockProps , {
96- allowedBlocks : ALLOWED_BLOCKS ,
103+ allowedBlocks : FilteredAllowedBlocks ,
97104 orientation : 'horizontal' ,
98105 placeholder : SocialPlaceholder ,
99106 templateLock : false ,
You can’t perform that action at this time.
0 commit comments