Make WordPress Core

Opened 13 years ago

Closed 13 years ago

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


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
13 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.

#2 @linguasite
13 years ago

OK, got it, thanks.

Note: See TracTickets for help on using tickets.