[wp-hackers] wp_insert_term - why no name?
Alex Andrews
awgandrews at gmail.com
Wed Aug 3 12:45:46 UTC 2011
Got it, thanks.
Alex
--
Alex Andrews
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
On Wednesday, 3 August 2011 at 13:44, Dion Hulse (dd32) wrote:
> 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.
>
> D
>
> On 3 August 2011 22:42, Alex Andrews <awgandrews at gmail.com (mailto: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.
> >
> > Alex
> >
> > On 3 August 2011 13:39, Dion Hulse (dd32) <wordpress at dd32.id.au (mailto: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 (mailto: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 (mailto:wp-hackers at lists.automattic.com)
> > > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > > _______________________________________________
> > > wp-hackers mailing list
> > > wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> > > http://lists.automattic.com/mailman/listinfo/wp-hackers
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com (mailto:wp-hackers at lists.automattic.com)
> http://lists.automattic.com/mailman/listinfo/wp-hackers
More information about the wp-hackers
mailing list