Skip to content

Taxonomy: Avoid repeatedly decoding the term hierarchy. - #13987

Open
sekalan wants to merge 4 commits into
WordPress:trunkfrom
sekalan:fix-term-hierarchy-repeated-deserialization
Open

sekalan wants to merge 4 commits into
WordPress:trunkfrom
sekalan:fix-term-hierarchy-repeated-deserialization

Conversation

@sekalan

@sekalan sekalan commented Oct 4, 2026 •

Copy link
Copy Markdown

Load the hierarchy once for descendant traversal and reuse it within the hierarchical hide_empty pass. Preserve descendant ordering and visibility checks, with regression coverage for hierarchy reads and term changes.

Trac ticket: https://core.trac.wordpress.org/ticket/66242

Use of AI Tools

AI assistance: Yes
Tool(s): Codex, Gemini Web
Model(s): GPT-6.1, Sol, Gemini 3.5 Flash
Used for: Initial performance investigation, code skeleton, tests

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.

Load the hierarchy once for descendant traversal and reuse it within the
hierarchical hide_empty pass. Preserve descendant ordering and visibility
checks, with regression coverage for hierarchy reads and term changes.
@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

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 props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props serhatsoylu06, westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@westonruter

Copy link
Copy Markdown
Member

@sekalan I think you referenced the wrong Trac ticket for this. You opened #13986 for Core-66241 already.

@westonruter

Copy link
Copy Markdown
Member

I've corrected the reference to Core-66242

@westonruter

Copy link
Copy Markdown
Member

@sekalan Please include the AI Disclosure in the PR description:

## Use of AI Tools
<!--
You are free to use artificial intelligence (AI) tooling to contribute, but you must disclose what tooling you are using and to what extent a pull request has been authored by AI. It is your responsibility to review and take responsibility for what AI generates. See the WordPress AI Guidelines: <https://make.wordpress.org/ai/handbook/ai-guidelines/>.
Example disclosure:
AI assistance: Yes
Tool(s): GitHub Copilot, ChatGPT
Model(s): GPT-5.1
Used for: Initial code skeleton and test suggestions; final implementation and tests were reviewed and edited by me.
-->

@sekalan

sekalan commented Oct 5, 2026

Copy link
Copy Markdown
Author

@sekalan Please include the AI Disclosure in the PR description:

## Use of AI Tools
<!--
You are free to use artificial intelligence (AI) tooling to contribute, but you must disclose what tooling you are using and to what extent a pull request has been authored by AI. It is your responsibility to review and take responsibility for what AI generates. See the WordPress AI Guidelines: <https://make.wordpress.org/ai/handbook/ai-guidelines/>.
Example disclosure:
AI assistance: Yes
Tool(s): GitHub Copilot, ChatGPT
Model(s): GPT-5.1
Used for: Initial code skeleton and test suggestions; final implementation and tests were reviewed and edited by me.
-->

Thanks @westonruter, sorry for the confusion with the ticket reference. i started investigating this second issue using gpt, but hit my usage limit right before completing it, so i switched to gemini 3.5 flash to finish the task and submit the pr. that's why i mixed up the ticket number and was unsure about how to format the disclosure. i appreciate you fixing the reference! I've also updated the pr description with the ai disclosure.

Comment thread src/wp-includes/taxonomy.php Outdated
yes, thanks! applied.

Co-authored-by: Weston Ruter <westonruter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants