WordPress.org

Make WordPress Core

Opened 17 months ago

Closed 9 months ago

Last modified 9 months 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 Owned by: 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 17 months ago.
22542.2.diff (2.8 KB) - added by ericmann 9 months ago.
Refreshed patch against trunk

Download all attachments as: .zip

Change History (7)

comment:1 SergeyBiryukov17 months ago

  • Version changed from trunk to 2.9

SergeyBiryukov17 months ago

comment:2 SergeyBiryukov17 months ago

  • Keywords has-patch added

ericmann9 months ago

Refreshed patch against trunk

comment:3 ericmann9 months ago

  • Keywords commit added

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

comment:4 nacin9 months 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.

comment:5 ocean909 months ago

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