Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#22542 closed defect (bug) (fixed)

wp_insert_term and wp_update_term should include taxonomy as the second parameter when invoking actions edit_terms and edited_terms

Reported by: akibjorklund's profile akibjorklund Owned by: nacin's profile nacin
Milestone: 3.7 Priority: normal
Severity: normal Version: 2.9
Component: Taxonomy Keywords: has-patch commit
Focuses: Cc:

Description

wp_insert_term and wp_update_term only send term id when invoking edit_terms and edited_terms. This makes it hard for plugins hooking into those to retrieve the actual term, since get_term and get_term_by require taxonomy in addition to the id.

Other actions on these functions do add the taxonomy to the parameters. For example edit_term and edited_term. So it is hard to understand why the hooks in question do not.

Attachments (2)

22542.patch (2.8 KB) - added by SergeyBiryukov 11 years ago.
22542.2.diff (2.8 KB) - added by ericmann 11 years ago.
Refreshed patch against trunk

Download all attachments as: .zip

Change History (7)

#1 @SergeyBiryukov
11 years ago

  • Version changed from trunk to 2.9

#2 @SergeyBiryukov
11 years ago

  • Keywords has-patch added

@ericmann
11 years ago

Refreshed patch against trunk

#3 @ericmann
11 years ago

  • Keywords commit added

Sergey's patch looks great. Just refreshed it against trunk. Ready for commit.

#4 @nacin
11 years ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 24829:

Add $taxonomy to edit_terms and edited_terms actions. props SergeyBiryukov, fixes #22542.

#5 @ocean90
11 years ago

  • Milestone changed from Awaiting Review to 3.7
Note: See TracTickets for help on using tickets.