Description
openedon Oct 5, 2021
With the launch of the pattern directory (and the upcoming ability for folks to submit their own patterns to it), we should consider building a route through which themes can highlight specific patterns to their users.
Traditionally, themes have bundled their own proprietary patterns directly via PHP, and tend to highlight them in a category named after the theme:
This is fine, but it locks those patterns into that one specific theme. What if (for example) a theme could place all of those patterns directly in the Pattern Directory itself, and then reference them from within theme.json
. These referenced patterns could either be highlighted in the inserter via a "Theme Name" category, or bubbled up to the top of the list and given a special "theme" badge of some kind.
This would:
- Cut down considerably on theme code.
- Make theme patterns far easier to update, test, and review.
- Encourage theme authors to seed the pattern directory with even more patterns.
- Reduce pattern redundancy in the Pattern Directory by letting multiple themes reference the same simple patterns.
If a theme's pattern relied on special block styles, then the theme would still be free to register them the traditional way.
Related to #33046, #35115
This should maybe be part of #31153?