[wp-hackers] Category & Tag Function to update count

Nathaniel Taintor goldenapplesdesign at gmail.com
Fri Feb 10 01:57:04 UTC 2012


Try looking at wp_update_term_count() in /wp-includes/taxonomy.php

Taxonomies can register their own custom callback function, but this is the
function used by post tags and categories.


Nathaniel Taintor, Designer/Developer
*Golden Apples Design*
http://goldenapplesdesign.com

@GoldenApples | 717.434.3226
goldenapplesdesign at gmail.com



On Thu, Feb 9, 2012 at 6:08 PM, Jeremy Clarke <jer at simianuprising.com>wrote:

> On Thu, Feb 9, 2012 at 3:19 PM, James Laws <jamielaws at gmail.com> wrote:
>
> >
> > I know there is a function that I believe the category and tag ID are
> > passed through when ever ones is added or removed from a post. I've
> looked
> > through the core and can't for the life of me find the function. Does
> > anyone know the function I speak of and/or where I might locate it.
> >
> >
> You will probably be satisfied by wp_set_object_terms() in
> /wp-includes/taxonomy.php and the 'set_object_terms' *action*  (not
> function) it runs right before returning.
>
> http://codex.wordpress.org/Function_Reference/wp_set_object_terms
>
> --
> Jeremy Clarke • jeremyclarke.org
> Code and Design • globalvoicesonline.org
> _______________________________________________
> 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