apply_filters( 'pre_insert_term', string|WP_Error $term, string $taxonomy )

Filters a term before it is sanitized and inserted into the database.

Parameters

$term

(string|WP_Error) The term name to add, or a WP_Error object if there's an error.

$taxonomy

(string) Taxonomy slug.

Source

File: wp-includes/taxonomy.php

View on Trac

Changelog

Version Description
3.0.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/pre_insert_term