tag_link
Filters the tag link.
Использование
add_filter( 'tag_link', 'wp_kama_tag_link_filter', 10, 2 ); /** * Function for `tag_link` filter-hook. * * @param string $termlink Tag link URL. * @param int $term_id Term ID. * * @return string */ function wp_kama_tag_link_filter( $termlink, $term_id ){ // filter... return $termlink; }
- $termlink(строка)
- Tag link URL.
- $term_id(int)
- Term ID.
Список изменений
С версии 2.3.0 | Введена. |
С версии 2.5.0 | Deprecated in favor of term_link filter. |
С версии 5.4.1 | Restored (un-deprecated). |
Где вызывается хук
wp-includes/taxonomy.php 4708
$termlink = apply_filters( 'tag_link', $termlink, $term->term_id );