term_id_filter
Filters the term ID after a new term is created.
Usage
add_filter( 'term_id_filter', 'wp_kama_term_id_filter', 10, 2 ); /** * Function for `term_id_filter` filter-hook. * * @param int $term_id Term ID. * @param int $tt_id Term taxonomy ID. * * @return int */ function wp_kama_term_id_filter( $term_id, $tt_id ){ // filter... return $term_id; }
- $term_id(int)
- Term ID.
- $tt_id(int)
- Term taxonomy ID.
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
term_id_filter
term_id_filter
wp-includes/taxonomy.php 2610
$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
wp-includes/taxonomy.php 3330
$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );
Where the hook is used in WordPress
wp-includes/ms-default-filters.php 78
add_filter( 'term_id_filter', 'global_terms', 10, 2 );