pre_term_link filter-hookWP 4.9.0

Filters the permalink structure for a term before token replacement occurs.

Usage

add_filter( 'pre_term_link', 'wp_kama_pre_term_link_filter', 10, 2 );

/**
 * Function for `pre_term_link` filter-hook.
 * 
 * @param string  $termlink The permalink structure for the term's taxonomy.
 * @param WP_Term $term     The term object.
 *
 * @return string
 */
function wp_kama_pre_term_link_filter( $termlink, $term ){

	// filter...
	return $termlink;
}
$termlink(string)
The permalink structure for the term's taxonomy.
$term(WP_Term)
The term object.

Changelog

Since 4.9.0 Introduced.

Where the hook is called

get_term_link()
pre_term_link
wp-includes/taxonomy.php 4658
$termlink = apply_filters( 'pre_term_link', $termlink, $term );

Where the hook is used in WordPress

Usage not found.