[wp-hackers] wp_insert_term - why no name?

Alex Andrews awgandrews at gmail.com
Wed Aug 3 12:42:56 UTC 2011


It completely makes sense, it just seems odd - there is no good reason
for wp_insert_term not to allow you to insert the name and the time of
creation of the term. Especially as wp_update_term does.

Alex

On 3 August 2011 13:39, Dion Hulse (dd32) <wordpress at dd32.id.au> wrote:
> The wp_insert_term() function differs slightly, due to the fact it's
> primary use is to create, rather than update.
>
> The signature in expanded form is:
> wp_insert_term( Name, Taxonomy, array( Slug, Parent, Alias Of, Description) )
>
> whereas, wp_update_term is
> wp_update_term( Term ID, Taxonomy, array( Name, Slug, Parent, Alias
> Of, Description) )
> as you're operating on the Term ID rather than the Term Name..
>
> I'm not sure what documentation you're looking at, as I always suggest
> looking at the source when something doesnt make sense.
>
> On 3 August 2011 22:34, Alex Andrews <awgandrews at gmail.com> wrote:
>>  Dear all,
>>
>> I see that wp_insert_term has no name argument, whereas wp_update_term does - is this an error in documentation, or should I submit a patch to this minor change which would be fairly useful?
>>
>> All the best,
>>
>> Alex
>>
>> --
>> Alex Andrews
>> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list