Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#19584 closed feature request (wontfix)

Ability to use wp_insert_term to add multiple terms (pass term as array)

Reported by: zanematthew's profile 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)

#1 @scribu
12 years ago

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

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 of arrays.

Just use a foreach loop or make a wrapper function if you need to do this often.

Last edited 12 years ago by scribu (previous) (diff)

#2 @ZaneMatthew
12 years ago

Thats exactly what i did just thought I'd pitch it :D

Note: See TracTickets for help on using tickets.