pre_insert_term filter-hook . WP 3.0.0
Filters a term before it is sanitized and inserted into the database.
Usage
add_filter( 'pre_insert_term', 'filter_function_name_9652', 10, 2 ); function filter_function_name_9652( $term, $taxonomy ){ // filter... return $term; }
- $term(string/WP_Error)
- The term name to add, or a WP_Error object if there's an error.
- $taxonomy(string)
- Taxonomy slug.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
pre_insert_term
wp-includes/taxonomy.php 2214
$term = apply_filters( 'pre_insert_term', $term, $taxonomy );