-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Patterns: add categories to user created patterns #53164
Copy link
Copy link
Closed
Labels
[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Metadata
Metadata
Assignees
Labels
[Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsyncedA collection of blocks that can be synced (previously reusable blocks) or unsynced[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Overview
Currently, there is no way for users to categorize/arrange their synced and unsynced patterns, they all appear under the 'My patterns' category.
Proposed solution?
Add a WP custom taxonomy called
wp_pattern_categoryfor thewp_blockCPT.The .org and theme patterns have a category registry, but these categories are generated on load based on the .org and theme patterns that are currently available to the site. There is no way for users to add/save their own categories, or to assign them to the
wp_blockCPT.Options were explored of adding the existing pattern slugs to the
wp_blockCPT postmeta, but there would be performance issues with retrieving all patterns with a given category with this approach, and this also does not allow users to add their own categories.WP taxonomies are a standard way to allow categorization of custom CPTs, and all the add/update/search functionality already exists, so this seems like the best way to add this functionality.
N.B. Tasks 2-5 below should all go into the same release, so ideally should be merged only when all 6 are ready to go
#53835 is the parent PR
#53837 & #53933 are branched off #53835
#54007 is branched off #53933
so merge order should be #54007, #53933, #53837, #53835
Tasks
,- PR merged into Patterns: Add categories to user patterns, and allow filtering by these in site and post editor #53835