Make WordPress Core

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#15581 closed defect (bug) (fixed)

Incomplete Abstraction of wp_insert_category()

Reported by: miqrogroove Owned by: garyc40
Milestone: 3.4 Priority: normal
Severity: normal Version: 3.0
Component: General Keywords: has-patch needs-testing 3.2-early
Focuses: Cc:


in wp-admin/includes/taxonomy.php the function wp_insert_category() takes a taxonomy argument, but it still relies on functions category_exists() and cat_is_ancestor_of() which do not work accordingly.

Attachments (3)

garyc40-15581.patch (2.5 KB) - added by garyc40 10 years ago.
there's a patch for that
15581.diff (3.1 KB) - added by ryan 9 years ago.
15581-unit.diff (1.8 KB) - added by ryan 9 years ago.
Quick unit tests

Download all attachments as: .zip

Change History (8)

#1 @nacin
10 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to Future Release

Looks like it'll work fine for non-hierarchical taxonomies or top-level terms in the meantime. Nice catch.

#2 @garyc40
10 years ago

  • Owner set to garyc40
  • Status changed from new to assigned

10 years ago

there's a patch for that

#3 @garyc40
10 years ago

  • Keywords has-patch needs-testing 3.2-early added; needs-patch removed

9 years ago


9 years ago

Quick unit tests

#4 @ryan
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In [19678]:

Introduce term_is_ancestor_of(). Finish taxonomy support for wp_insert_category(). Props garyc40. fixes #15581

#5 @ryan
9 years ago

  • Milestone changed from Future Release to 3.4
Note: See TracTickets for help on using tickets.