Skip to content

Patterns should not display if their blocks are not allowed #23275

@chrisvanpatten

Description

@chrisvanpatten

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:

  1. Create a post type
  2. Use allowed_block_types filter to limit blocks down to one or two
  3. Observe patterns displaying

Expected behavior
Patterns should only display if all their constituent blocks are available.

Screenshots
Screen Shot 2020-06-18 at 8 58 18 AM

Metadata

Metadata

Assignees

Labels

[Feature] InserterThe main way to insert blocks using the + button in the editing interface[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions