Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15320 closed defect (bug) (invalid)

tax_input does not work with category slugs

Reported by: linguasite's profile linguasite Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1
Component: Taxonomy Keywords: taxonomy insert post category
Focuses: Cc:

Description

When inserting/updating a post, the slugs of custom taxonomies can be stored in the tax_input array and will be assigned to the post or created if they do no exist.
However, the category taxonomy array in tax_input must contain the term_id's of the categories, otherwise the values will be ignored.

See /wp_includes/post.php line 2532.

Any ideas why this happens?

Change History (2)

#1 @mdawaffe
14 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

This is intentional. Hierarchical taxonomies must use IDs since multiple terms can have the same slug as long as they belong to different branches/depths of the hierarchy.

http://core.trac.wordpress.org/browser/trunk/wp-includes/post.php?rev=17298#L2877

#2 @linguasite
14 years ago

OK, got it, thanks.

Note: See TracTickets for help on using tickets.