Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: term_id_filter

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
2197
2198      /**
2199       * Filters the term ID after a new term is created.
2200       *
2201       * @since 2.3.0
2202       *
2203       * @param int $term_id Term ID.
2204       * @param int $tt_id   Taxonomy term ID.
2205       */
2206      $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
2207
2208      clean_term_cache($term_id, $taxonomy);
2209
2210      /**
2211       * Fires after a new term is created, and after the term cache has been cleaned.
2212       *
2213       * @since 2.3.0
2214       *
2215       * @param int    $term_id  Term ID.
 
Line Code
2799       *
2800       * @since 2.3.0
2801       *
2802       * @param int $term_id Term ID.
2803       * @param int $tt_id   Term taxonomy ID.
2804       */
2805      do_action( "edit_{$taxonomy}", $term_id, $tt_id );
2806
2807      /** This filter is documented in wp-includes/taxonomy.php */
2808      $term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
2809
2810      clean_term_cache($term_id, $taxonomy);
2811
2812      /**
2813       * Fires after a term has been updated, and the term cache has been cleaned.
2814       *
2815       * @since 2.3.0
2816       *
2817       * @param int    $term_id  Term ID.