Skip to content

Commit

Permalink
Fix: Removing footnotes from the allowed blocks does not remove footn…
Browse files Browse the repository at this point in the history
…otes. (#58855)

Co-authored-by: jorgefilipecosta <jorgefilipecosta@git.wordpress.org>
  • Loading branch information
jorgefilipecosta and jorgefilipecosta committed Feb 9, 2024
1 parent 260bde6 commit 76ca987
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/block-library/src/footnotes/format.js
Expand Up @@ -62,6 +62,16 @@ export const format = {
return false;
}

const allowedBlocks =
select( blockEditorStore ).getSettings().allowedBlockTypes;
if (
allowedBlocks === false ||
( Array.isArray( allowedBlocks ) &&
! allowedBlocks.includes( 'core/footnotes' ) )
) {
return false;
}

const entityRecord = select( coreDataStore ).getEntityRecord(
'postType',
postType,
Expand Down

0 comments on commit 76ca987

Please sign in to comment.