Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add filters for block patterns and block pattern categories #238

Merged
merged 2 commits into from Nov 16, 2021

Conversation

desrosj
Copy link
Contributor

@desrosj desrosj commented Nov 15, 2021

Description

This adds two new filters for adjusting the theme's block pattern categories and block patterns, respectively.

  • twentytwentytwo_block_pattern_categories
  • twentytwentytwo_block_patterns.

This makes it possible for a site owner to easily adjust the list of available block patterns and pattern categories without having to override the entire function, which prevents all future changes to this function from being available when this happens).

Fixes #219.

@desrosj desrosj self-assigned this Nov 15, 2021
Copy link
Collaborator

@jffng jffng left a comment

Choose a reason for hiding this comment

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

I think this is a welcome change for this reason:

This makes it possible for a site owner to easily adjust the list of available block patterns and pattern categories without having to override the entire function, which prevents all future changes to this function from being available when this happens).

Thanks @desrosj!

@jffng jffng merged commit 0a538b0 into trunk Nov 16, 2021
@jffng jffng deleted the add-pattern-filters branch November 16, 2021 23:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow block patterns to be filtered
2 participants