Make WordPress Core

Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#15581 closed defect (bug) (fixed)

Incomplete Abstraction of wp_insert_category()

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

Description

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 14 years ago.
there's a patch for that
15581.diff (3.1 KB) - added by ryan 13 years ago.
Refreshed
15581-unit.diff (1.8 KB) - added by ryan 13 years ago.
Quick unit tests

Download all attachments as: .zip

Change History (8)

#1 @nacin
14 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
14 years ago

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

@garyc40
14 years ago

there's a patch for that

#3 @garyc40
14 years ago

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

@ryan
13 years ago

Refreshed

@ryan
13 years ago

Quick unit tests

#4 @ryan
13 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
13 years ago

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