Make WordPress Core

Opened 5 months ago

#48416 new enhancement

Add `saved_term` actions that fire on create and update

Reported by: dlh Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: has-patch
Focuses: Cc:


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.

Attachments (1)

48416.diff (1.7 KB) - added by dlh 5 months ago.

Download all attachments as: .zip

Change History (1)

5 months ago

Note: See TracTickets for help on using tickets.