[wp-trac] [WordPress Trac] #48416: Add `saved_term` actions that fire on create and update
WordPress Trac
noreply at wordpress.org
Thu Oct 24 01:28:03 UTC 2019
#48416: Add `saved_term` actions that fire on create and update
-------------------------+-----------------------------
Reporter: dlh | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version:
Severity: normal | Keywords: has-patch
Focuses: |
-------------------------+-----------------------------
The `save_post` and `save_post_{$post_type}` actions fire both when a post
is created or updated. Terms have separate `created_*` and `edited_*`
hooks, but not a shared hook like posts do.
So, if a developer wants to hook into both the create and update events,
two `add_action()`s are required for terms, but only one is required for
posts.
This patch proposes adding new `saved_term` and `saved_{$taxonomy}` hooks
to `wp_insert_term()` and `wp_update_term()` to bring the same convenience
to terms currently available for posts.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48416>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list