#15320 closed defect (bug) (invalid)
tax_input does not work with category slugs
Reported by: | 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)
Note: See
TracTickets for help on using
tickets.
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