[wp-trac] [WordPress Trac] #60532: Add a `pre_set_object_terms` action
WordPress Trac
noreply at wordpress.org
Tue Feb 13 19:42:58 UTC 2024
#60532: Add a `pre_set_object_terms` action
---------------------------+-----------------------------
Reporter: davidbaumwald | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: trunk
Severity: normal | Keywords:
Focuses: |
---------------------------+-----------------------------
Working with some custom terms & taxonomies, and it looks like there's no
way to hook in to `wp_set_object_terms` _before_ the terms are updated.
In the end, the `$old_tt_ids` is passed to the `set_object_terms`
action(added in r12261). But, these are the `term_taxonomy_id`s and a a
bit harder to work with than the plain terms. Also, these are provided
_after_ the terms are updated. So, there's no way to short-circuit the
updating.
However, I think it would be useful to have a `pre_` action that can work
on the current terms before commiting the changes.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60532>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list