-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
6.4 Backport: Add a taxonomy for user pattern categories #5234
6.4 Backport: Add a taxonomy for user pattern categories #5234
Conversation
@glendaviesnz, do you mind including changes from WordPress/gutenberg#54567 here as well? |
Thank you, @glendaviesnz! |
@@ -186,6 +186,8 @@ public function test_expected_routes_in_schema() { | |||
'/wp-site-health/v1/tests/authorization-header', | |||
'/wp-site-health/v1/tests/page-cache', | |||
'/wp-site-health/v1/directory-sizes', | |||
'/wp/v2/wp_pattern_category', | |||
'/wp/v2/wp_pattern_category/(?P<id>[\d]+)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to run this test suite locally for some reason, but the earlier CI failures pointed to these lines being missing so I added them in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, still failing. Does anything need to be updated on the REST API side to support this taxonomy?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all that was added in the plugin to make it work https://github.com/WordPress/gutenberg/pull/53163/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I run this branch locally going to /wp-admin/edit-tags.php?taxonomy=wp_pattern_category shows the taxonomy and allows you to edit it, but that is not via REST I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran all the unit tests locally and this regenerated the fixtures file - so hopefully pushing this fixes it.
Done @Mamaduka |
094e58b
to
9ec7089
Compare
@tellthemachines the remaining test failures don't seem to be related to this PR but I don't have permissions to restart them - are you able to rerun the failed jobs please? |
@glendaviesnz thanks for sorting the issue out! I've restarted the e2e tests but they've been failing often on PR branches so it's not really a concern 🤷 as long as all the PHP tests pass we're good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM!
Committed in r56642. |
Description
Adds a custom taxonomy
wp_pattern_category
to allow users to assign categories to their custom patterns.Gutenberg PR .
Trac ticket: https://core.trac.wordpress.org/ticket/59379
Testing Instructions
/wp-admin/edit.php?post_type=wp_block
and add a new patternScreenshots or screencast
categories.mp4
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.