term_link
Filter HookDescription
Filters the term link.Hook Information
File Location |
wp-includes/taxonomy.php
View on GitHub
|
Hook Type | Filter |
Line Number | 4744 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$termlink
|
Term link URL. |
WP_Term
|
$term
|
Term object. |
string
|
$taxonomy
|
Taxonomy slug. |
Usage Examples
Basic Usage
<?php
// Hook into term_link
add_filter('term_link', 'my_custom_filter', 10, 3);
function my_custom_filter($termlink, $term, $taxonomy) {
// Your custom filtering logic here
return $termlink;
}
Source Code Context
wp-includes/taxonomy.php:4744
- How this hook is used in WordPress core
<?php
4739 *
4740 * @param string $termlink Term link URL.
4741 * @param WP_Term $term Term object.
4742 * @param string $taxonomy Taxonomy slug.
4743 */
4744 return apply_filters( 'term_link', $termlink, $term, $taxonomy );
4745 }
4746
4747 /**
4748 * Displays the taxonomies of a post with available options.
4749 *
PHP Documentation
<?php
/**
* Filters the term link.
*
* @since 2.5.0
*
* @param string $termlink Term link URL.
* @param WP_Term $term Term object.
* @param string $taxonomy Taxonomy slug.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.