WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

Last modified 3 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:

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

Download all attachments as: .zip

Change History (8)

comment:1 @nacin5 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.

comment:2 @garyc405 years ago

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

@garyc404 years ago

there's a patch for that

comment:3 @garyc404 years ago

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

@ryan3 years ago

Refreshed

@ryan3 years ago

Quick unit tests

comment:4 @ryan3 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

comment:5 @ryan3 years ago

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