term_id_filter хук-фильтрWP 2.3.0

Filters the term ID after a new term is created.

Использование

add_filter( 'term_id_filter', 'wp_kama_term_id_filter', 10, 3 );

/**
 * Function for `term_id_filter` filter-hook.
 * 
 * @param int   $term_id Term ID.
 * @param int   $tt_id   Term taxonomy ID.
 * @param array $args    Arguments passed to wp_insert_term().
 *
 * @return int
 */
function wp_kama_term_id_filter( $term_id, $tt_id, $args ){

	// filter...
	return $term_id;
}
$term_id(int)
Term ID.
$tt_id(int)
Term taxonomy ID.
$args(массив)
Arguments passed to wp_insert_term().

Список изменений

С версии 2.3.0 Введена.
С версии 6.1.0 The $args parameter was added.

Где вызывается хук

wp_insert_term()
term_id_filter
wp_update_term()
term_id_filter
wp-includes/taxonomy.php 2684
$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id, $args );
wp-includes/taxonomy.php 3428
$term_id = apply_filters( 'term_id_filter', $term_id, $tt_id );

Где используется хук в WordPress

Использование не найдено.