-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patterns should not display if their blocks are not allowed #23275
Comments
There might also be an intersection with |
This issue also applies to Reusable Blocks. |
I needed to solve this for a custom post type of mine and spun off the solution into a standalone plugin: https://github.com/jeremyfelt/unregister-broken-patterns I don't have enough familiarity with "allowed" vs registered/unregistered block types and how to account for that in thinking of where a solution should be implemented. My guess is that All in all, +1 for fixing this. :) |
I literally just came across this issue while testing your Shortnotes plugin, @jeremyfelt. Came here to create a new issue. |
@justintadlock If you haven't found it yet, this is a plugin in the repo now too: https://wordpress.org/plugins/unregister-broken-patterns I'm still behind on documenting the quirks. :) |
Via #30300:
@ntsekouras @david-szabo97 This ticket was auto-closed when #30300 was merged. Can it be reopened until a more complete solution is in place? Thanks! |
I move my comment here -> #31706 (comment) |
Describe the bug
In the current version of Gutenberg (8.3.0) and several earlier versions, block patterns display even if the blocks they are composed of are not "allowed" on the post type (via the
allowed_block_types
filter). Patterns should be hidden if they are composed of disallowed blocks.To reproduce
Steps to reproduce the behavior:
allowed_block_types
filter to limit blocks down to one or twoExpected behavior
Patterns should only display if all their constituent blocks are available.
Screenshots
The text was updated successfully, but these errors were encountered: