pre_term_(field) filter-hook . WP 2.3.0
Filters a term field value before it is sanitized.
The dynamic portion of the filter name, $field, refers to the term field.
Usage
add_filter( 'pre_term_(field)', 'filter_function_name_3256', 10, 2 ); function filter_function_name_3256( $value, $taxonomy ){ // filter... return $value; }
- $value(mixed)
- Value of the term field.
- $taxonomy(string)
- Taxonomy slug.
Changelog
Since 2.3.0 | Introduced. |
Where the hook is called
pre_term_(field)
wp-includes/taxonomy.php 1639
$value = apply_filters( "pre_term_{$field}", $value, $taxonomy );
Where in WP core the hook is used WordPress
wp-includes/taxonomy.php 86
add_filter( 'pre_term_slug', 'sanitize_title' );