-
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: core 'featured' category not registered #40443
Comments
I have confirmed this. The "Featured" category did used to exist by default. @Mamaduka do you know if something may have changed with the updates to the Patterns API or perhaps the Patterns Directory integration? |
@ndiego, it looks like related to the new API changes. The category is registered before loading remote patterns. Now, this function is only called via REST API, so it's not available during the normal WP lifecycle. |
Hmm, I am on the fence about whether we should consider this a "bug", or simply a "change". It will impact themes that are currently using the "Featured" category without registering it themselves and place patterns in the "Uncategorized" category, but perhaps all categories that a theme wants to use should be registered by the theme itself. 🤔 It's hard to tell if this was an intentional change or an oversight. The easiest solution would be to add it back if possible, but I could be convinced it should not have been registered to begin with. |
Probably an oversight on our part. The category is also used for featured patterns from Patterns Directory. |
Description
As of 13.0 the core
featured
pattern category does not seem to be registered, and the category is missing from the pattern section of the block inserter.If trying to recreate this issue with Twenty Twenty-Two theme you will need to comment out L17 of
/twentytwentytwo/inc/block-patterns.php
as this theme registers the category itself.Prior to Gutenberg 13.0 the core
featured
category was available without the theme needing to register it, so I'm not sure if this is a bug or whether it is intended.Step-by-step reproduction instructions
Activate a theme that does not register the
featured
pattern categoryor remove/comment out where the theme is registering the
featured
categoryEdit a post/page, select the 'Patterns' tab in the block inserter.
Notice the core 'Featured' category is missing from the dropdown selector.
Screenshots, screen recording, code snippet
No response
Environment info
WP 5.9.3
Gutenberg 13.0
Twenty Twenty-Two theme, and other themes
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: