term_link
Filters the term link.
Usage
add_filter( 'term_link', 'wp_kama_term_link_filter', 10, 3 ); /** * Function for `term_link` filter-hook. * * @param string $termlink Term link URL. * @param WP_Term $term Term object. * @param string $taxonomy Taxonomy slug. * * @return string */ function wp_kama_term_link_filter( $termlink, $term, $taxonomy ){ // filter... return $termlink; }
- $termlink(string)
- Term link URL.
- $term(WP_Term)
- Term object.
- $taxonomy(string)
- Taxonomy slug.
Changelog
Since 2.5.0 | Introduced. |
Where the hook is called
wp-includes/taxonomy.php 4727
return apply_filters( 'term_link', $termlink, $term, $taxonomy );
Where the hook is used in WordPress
wp-includes/default-filters.php 554
add_filter( 'term_link', '_post_format_link', 10, 3 );