-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Terms Query: Show nested terms toggle when inheriting #72510
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
Conversation
|
Size Change: -19 B (0%) Total Size: 2.18 MB
ℹ️ View Unchanged
|
packages/block-library/src/terms-query/edit/inspector-controls/inherit-control.js
Outdated
Show resolved
Hide resolved
|
We need to also update the php logic for fetching the proper terms. Currently we cannot use |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Thanks @ntsekouras. I've had a go at addressing this in 3752755. I think it's working in my testing on both templates and posts/pages, but it would be good to have more testing. I noticed that the |
| @@ -0,0 +1,88 @@ | |||
| /** | |||
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 useCurrentTerm is very similar to the useArchiveLabel, useTermDescription, and useTermName hooks, so I think we should consolidate this functionality as much as possible in a follow-up.
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 functionality had some heavy discussion in #72300 which ultimately didn't get merged. There are issues if taxonomy slugs contain hyphens, because the template slug does not include additional separators. Historically WordPress applies a template if it matches certain criteria but doing the reverse is tricky.
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.
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.
Thanks both, sounds like something that would be best in its own PR. I've removed the changes to the editor logic in 546598a.
ntsekouras
left a 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.
LGTM, thanks!
Co-authored-by: mikachan <mikachan@git.wordpress.org> Co-authored-by: ntsekouras <ntsekouras@git.wordpress.org> Co-authored-by: cr0ybot <cr0ybot@git.wordpress.org>
|
I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: a66a55c |
|
Thanks for handling it @mikachan 🙌 |
What?
Addresses #72380 (comment)
This PR allows the "Show nested terms" toggle control to show when the Terms Query is inheriting the current query.
Why?
Gives the user more control over which terms are displayed in default/inherit mode.
How?
Removes the logic for only showing the "Show nested terms" toggle when in custom mode.
Testing Instructions
Screenshots or screencast
cc @cr0ybot