[wp-trac] [WordPress Trac] #63904: Add action hook when terms counts are updated
WordPress Trac
noreply at wordpress.org
Mon Sep 1 12:23:08 UTC 2025
#63904: Add action hook when terms counts are updated
-------------------------------------+-----------------------------
Reporter: LeonidasMilossis | Owner: SergeyBiryukov
Type: enhancement | Status: accepted
Priority: normal | Milestone: 6.9
Component: Taxonomy | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: performance
-------------------------------------+-----------------------------
Changes (by rollybueno):
* keywords: has-patch => has-patch needs-testing
Comment:
Replying to [comment:4 LeonidasMilossis]:
> I think you're right in that it should be at least that deep into the
flow, but I went with adding it in an even deeper level, in
`_update_post_term_count()` and in `_update_generic_term_count()`, because
this ensures it will only run when it should, but also that it will
definitely run then.
Got it - those internal helpers should be the better place for the action
hook. The code looks good to me, adding `needs-testing` tag
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63904#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list