category_link хук-фильтр . WP 1.5.0
Filters the category link.
Использование
add_filter( 'category_link', 'filter_function_name_5477', 10, 2 ); function filter_function_name_5477( $termlink, $term_id ){ // filter... return $termlink; }
- $termlink(строка)
- Category link URL.
- $term_id(число)
- Term ID.
Список изменений
С версии 1.5.0 | Введена. |
С версии 2.5.0 | Deprecated in favor of {@see 'term_link'} filter. |
С версии 5.4.1 | Restored (un-deprecated). |
Где вызывается хук
wp-includes/taxonomy.php 4431
$termlink = apply_filters( 'category_link', $termlink, $term->term_id );