-
Notifications
You must be signed in to change notification settings - Fork 177
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
REST API: support filtering taxonomies by hierarchical attribute #11652
Conversation
Size Change: +315 B (0%) Total Size: 2.63 MB
ℹ️ View Unchanged
|
Plugin builds for aea8570 are ready 🛎️!
|
This is exactly the same as what I was playing around with locally. I didn't want to have to override this core method like this, but if you want to do this, then I am happy with this change. Add a unit test and I will approve this change. |
As you said on the other PR, it's not a big deal as these should be cheap requests. But it felt like something that makes sense and could even be added to core. |
@swissspidy This just need php lints to pass and small unit tests and this is good to go. |
Sharing for visibility #11436 (comment) |
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.
👍
Context
Based on the discussion at #11625 / #11625 (comment)
Summary
Adds support for filtering hierarchical and flat taxonomies:
/wp-json/web-stories/v1/taxonomies
: shows all taxonomies/wp-json/web-stories/v1/taxonomies?hierarchical=true
: shows only hierarchical taxonomies/wp-json/web-stories/v1/taxonomies?hierarchical=flat
: shows only flat taxonomiesRelevant Technical Choices
To-do
User-facing changes
Testing Instructions
This PR can be tested by following these steps:
Reviews
Does this PR have a security-related impact?
Does this PR change what data or activity we track or use?
Does this PR have a legal-related impact?
Checklist
Type: XYZ
label to the PRFixes #