Skip to content

Conversation

@BrendanJercich
Copy link

@BrendanJercich BrendanJercich commented Jun 11, 2025

This change arises from a confusing issue where Ben was unable to make use of the core WP footnote functionality in prepping a site for a client pitch. As it turns out, the footnote item in the rich text editor is only available if the core footnotes block is permitted. Since this "check for block permission to allow feature" method seems to have been part of WP for several releases now, it seems possible that it will be linked to other things in future.

This is one way to prevent the issue from cropping up again--rather than specifying a set list of blocks to allow in the theme, retrieve a list of all of them from the registry and pick out the core blocks. This might be too permissive, though. Gabe submitted #114 as an alternative.

Copy link
Member

@wxactly wxactly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is too permissive as-is, but I really like the approach of changing this to a denylist-style implementation rather than how it is now (allowlist). If we can use this implementation but remove a few blocks around line 314 that we know for sure we don't want most of the time, this code will be perfect for us! And allow easy changes in the future without denying new core blocks by default.

@wxactly wxactly assigned BrendanJercich and unassigned wxactly Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants