[wp-hackers] wp_insert_term - why no name?
Dion Hulse (dd32)
wordpress at dd32.id.au
Wed Aug 3 12:44:41 UTC 2011
Sorry, I didn't make it clear enough then. The Name is the first
parameter of the wp_insert_term() function, as it's what's being
"Created", whereas, the update function it's in the args, as it's the
Term ID that's being operated on.
On 3 August 2011 22:42, Alex Andrews <awgandrews at gmail.com> wrote:
> 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.
> 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 Andrews
>>> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.com
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers