Conversation
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
82bc0d7 to
81e3c7f
Compare
…tegory is not provided
34bad39 to
94eeb1f
Compare
Trac ticket: https://core.trac.wordpress.org/ticket/59354
wp_insert_post()always calledwp_set_post_categories()on update, even when the caller did not passpost_category. The fallback then re-set the post's existing category list, which still goes through term-cache invalidation, term-relationship lookups, and counted toward the per-request query budget - a measurable regression for callers like REST API updates that change a single field.This PR gates that call on either (a) it being a new post or (b)
post_categorybeing explicitly set in the args. Thetags_inputandtax_inputpaths were already correctly guarded.Tests cover:
set_object_termsdoes not fire for thecategorytaxonomy on a parameterless updateUse of AI Tools
AI assistance: Yes
Tool(s): Antigravity IDE
Model(s): Gemini 2.5 Pro
Used for: Code analysis, conflict resolution, test suite updates, and patch verification. All changes were manually reviewed and tested locally.
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.