#19584 closed feature request (wontfix)
Ability to use wp_insert_term to add multiple terms (pass term as array)
Reported by: | ZaneMatthew | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.3 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
This would be a feature request, that being to allow wp_insert_term to take (both a string and) array as the argument for the $term.
wp_set_post_terms() can take a string or array as an argument for tags as outlined in the codex.
Change History (2)
Note: See
TracTickets for help on using
tickets.
I see no point in doing this. Unlike wp_set_post_terms(), wp_insert_term() also accepts an array of additional parameters for the term.
We wouldn't make wp_insert_post() accept an array.
Just use a foreach loop or make a wrapper function if you need to do this often.